]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Survival: Added ability to set start health and armor of cannon fodder.
authorLyberta <lyberta@lyberta.net>
Wed, 12 Apr 2017 06:41:42 +0000 (09:41 +0300)
committerLyberta <lyberta@lyberta.net>
Wed, 12 Apr 2017 06:41:42 +0000 (09:41 +0300)
qcsrc/server/mutators/mutator/gamemode_survival.qc
survival.cfg

index 84e84895caa5d218018b5afb08fd052b2063f8ff..b8fb599c3a94f2f1bc30e498a88f34805ad4bf0b 100644 (file)
@@ -89,6 +89,10 @@ int autocvar_g_surv_defender_start_ammo_cells;
 /// spawn.
 int autocvar_g_surv_defender_num_random_start_weapons;
 
+/// \brief How much health does cannon fodder get during spawn.
+int autocvar_g_surv_cannon_fodder_start_health;
+/// \brief How much armor does cannon fodder get during spawn.
+int autocvar_g_surv_cannon_fodder_start_armor;
 /// \brief Number of weapons that can be randomly given to cannon fodder during
 /// spawn.
 int autocvar_g_surv_cannon_fodder_num_random_start_weapons;
@@ -1635,6 +1639,9 @@ MUTATOR_HOOKFUNCTION(surv, PlayerSpawn)
                                }
                                case SURVIVAL_ROLE_CANNON_FODDER:
                                {
+                                       player.health = autocvar_g_surv_cannon_fodder_start_health;
+                                       player.armorvalue =
+                                               autocvar_g_surv_cannon_fodder_start_armor;
                                        player.items |= IT_UNLIMITED_AMMO;
                                        break;
                                }
index 6557a6b9a6eeb89317dfabee51b97cc4e55e510a..aaefffd58aed7113d28066f0fb5b2278872ab70b 100644 (file)
@@ -37,6 +37,8 @@ set g_surv_defender_start_weapons "okshotgun okmachinegun okvortex" "Which weapo
 set g_surv_defender_num_random_start_weapons 0 "Number of weapons that can be randomly given to defenders during spawn"
 set g_surv_defender_random_start_weapons "" "Weapons that can be randomly given to defenders during spawn"
 
+set g_surv_cannon_fodder_start_health 100 "How much health does cannon fodder get during spawn"
+set g_surv_cannon_fodder_start_armor 0 "How much armor does cannon fodder get during spawn"
 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"