]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Survival: Better attacker ammo pickup.
authorLyberta <lyberta@lyberta.net>
Wed, 12 Apr 2017 07:00:01 +0000 (10:00 +0300)
committerLyberta <lyberta@lyberta.net>
Wed, 12 Apr 2017 07:00:01 +0000 (10:00 +0300)
qcsrc/server/mutators/mutator/gamemode_survival.qc
survival.cfg

index b8fb599c3a94f2f1bc30e498a88f34805ad4bf0b..b128f5afc0db97710bb027af250dc3303114b31f 100644 (file)
@@ -97,6 +97,10 @@ int autocvar_g_surv_cannon_fodder_start_armor;
 /// spawn.
 int autocvar_g_surv_cannon_fodder_num_random_start_weapons;
 
+/// \brief How much health do attackers get when they pickup ammo.
+int autocvar_g_surv_attacker_pickup_ammo_health;
+/// \brief How much armor do attackers get when they pickup ammo.
+int autocvar_g_surv_attacker_pickup_ammo_armor;
 /// \brief How many health do defenders get when they pickup small health.
 int autocvar_g_surv_defender_pickup_health_small;
 /// \brief How many health do defenders get when they pickup medium health.
@@ -1715,8 +1719,10 @@ MUTATOR_HOOKFUNCTION(surv, ItemTouch)
                                case "item_cells":
                                case "droppedweapon":
                                {
-                                       GivePlayerHealth(player, g_pickup_healthmedium);
-                                       GivePlayerArmor(player, g_pickup_armormedium);
+                                       GivePlayerHealth(player,
+                                               autocvar_g_surv_attacker_pickup_ammo_health);
+                                       GivePlayerArmor(player,
+                                               autocvar_g_surv_attacker_pickup_ammo_armor);
                                        return MUT_ITEMTOUCH_CONTINUE;
                                }
                        }
index aaefffd58aed7113d28066f0fb5b2278872ab70b..3faededb7c08e15e4f07a8e16a611e56d7486ae0 100644 (file)
@@ -42,14 +42,16 @@ set g_surv_cannon_fodder_start_armor 0 "How much armor does cannon fodder get du
 set g_surv_cannon_fodder_num_random_start_weapons 2 "Number of weapons that can be randomly given to cannon fodder during spawn"
 set g_surv_cannon_fodder_random_start_weapons "machinegun mortar electro crylink vortex hagar devastator" "Weapons that can be randomly given to cannon fodder during spawn"
 
-set g_surv_defender_pickup_health_small 0 "How many health do defenders get when they pickup small health"
-set g_surv_defender_pickup_health_medium 0 "How many health do defenders get when they pickup medium health"
-set g_surv_defender_pickup_health_big 0 "How many health do defenders get when they pickup big health"
-set g_surv_defender_pickup_health_mega 0 "How many health do defenders get when they pickup mega health"
-set g_surv_defender_pickup_armor_small 0 "How many armor do defenders get when they pickup small armor"
-set g_surv_defender_pickup_armor_medium 0 "How many armor do defenders get when they pickup medium armor"
-set g_surv_defender_pickup_armor_big 0 "How many armor do defenders get when they pickup big armor"
-set g_surv_defender_pickup_armor_mega 0 "How many armor do defenders get when they pickup mega armor"
+set g_surv_attacker_pickup_ammo_health 25 "How much health do attackers get when they pickup ammo"
+set g_surv_attacker_pickup_ammo_armor 25 "How much armor do attackers get when they pickup ammo"
+set g_surv_defender_pickup_health_small 0 "How much health do defenders get when they pickup small health"
+set g_surv_defender_pickup_health_medium 0 "How much health do defenders get when they pickup medium health"
+set g_surv_defender_pickup_health_big 0 "How much health do defenders get when they pickup big health"
+set g_surv_defender_pickup_health_mega 0 "How much health do defenders get when they pickup mega health"
+set g_surv_defender_pickup_armor_small 0 "How much armor do defenders get when they pickup small armor"
+set g_surv_defender_pickup_armor_medium 0 "How much armor do defenders get when they pickup medium armor"
+set g_surv_defender_pickup_armor_big 0 "How much armor do defenders get when they pickup big armor"
+set g_surv_defender_pickup_armor_mega 0 "How much armor do defenders get when they pickup mega armor"
 set g_surv_defender_pickup_shells_small 6 "How many shells do defenders get when they pickup small health/armor"
 set g_surv_defender_pickup_shells_medium 15 "How many shells do defenders get when they pickup medium health/armor"
 set g_surv_defender_pickup_shells_big 30 "How many shells do defenders get when they pickup big health/armor"