From 4c470090744b354258b0e424a1b48053579f826d Mon Sep 17 00:00:00 2001 From: Lyberta Date: Wed, 12 Apr 2017 09:41:42 +0300 Subject: [PATCH] Survival: Added ability to set start health and armor of cannon fodder. --- qcsrc/server/mutators/mutator/gamemode_survival.qc | 7 +++++++ survival.cfg | 2 ++ 2 files changed, 9 insertions(+) diff --git a/qcsrc/server/mutators/mutator/gamemode_survival.qc b/qcsrc/server/mutators/mutator/gamemode_survival.qc index 84e84895c..b8fb599c3 100644 --- a/qcsrc/server/mutators/mutator/gamemode_survival.qc +++ b/qcsrc/server/mutators/mutator/gamemode_survival.qc @@ -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; } diff --git a/survival.cfg b/survival.cfg index 6557a6b9a..aaefffd58 100644 --- a/survival.cfg +++ b/survival.cfg @@ -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" -- 2.39.5