From: Lyberta Date: Wed, 12 Apr 2017 06:41:42 +0000 (+0300) Subject: Survival: Added ability to set start health and armor of cannon fodder. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4c470090744b354258b0e424a1b48053579f826d;p=xonotic%2Fxonotic-data.pk3dir.git Survival: Added ability to set start health and armor of cannon fodder. --- 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"