From 88646550e3a604d6b88c09ea034ed4be9daaaa90 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 30 Aug 2015 22:37:00 +1000 Subject: [PATCH] Add a potentially useful option to only allow the use of bonus nades --- mutators.cfg | 1 + qcsrc/server/autocvars.qh | 1 + qcsrc/server/mutators/mutator_nades.qc | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/mutators.cfg b/mutators.cfg index 0623ba375..7dd5e6d11 100644 --- a/mutators.cfg +++ b/mutators.cfg @@ -210,6 +210,7 @@ set g_nades_bonus_client_select 0 "Allow client side selection of bonus nade typ set g_nades_bonus_type 2 "Type of the bonus grenade. 1:normal 2:napalm 3:ice 4:translocate 5:spawn 6:heal 7:pokenade" set g_nades_bonus_onstrength 1 "Always give bonus grenades to players that have the strength powerup" set g_nades_bonus_max 3 "Maximum number of bonus grenades" +set g_nades_bonus_only 0 "Disallow regular nades, only bonus nades can be used" // Bonus score set g_nades_bonus_score_max 120 "Score value that will give a bonus nade" set g_nades_bonus_score_minor 5 "Score given for minor actions (pickups, regular frags etc.)" diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 42a48e985..0ca57bb02 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -766,6 +766,7 @@ int autocvar_g_nades_bonus_type; bool autocvar_g_nades_bonus; bool autocvar_g_nades_bonus_onstrength; bool autocvar_g_nades_bonus_client_select; +bool autocvar_g_nades_bonus_only; int autocvar_g_nades_bonus_max; int autocvar_g_nades_bonus_score_max; int autocvar_g_nades_bonus_score_time; diff --git a/qcsrc/server/mutators/mutator_nades.qc b/qcsrc/server/mutators/mutator_nades.qc index 9199fe1ea..0adff6068 100644 --- a/qcsrc/server/mutators/mutator_nades.qc +++ b/qcsrc/server/mutators/mutator_nades.qc @@ -795,6 +795,10 @@ float nade_customize() void nade_prime() { + if(autocvar_g_nades_bonus_only) + if(!self.bonus_nades) + return; // only allow bonus nades + if(self.nade) remove(self.nade); -- 2.39.2