From f88776a8a64a2dc22522064b8a100b6b981063fa Mon Sep 17 00:00:00 2001 From: Lyberta Date: Tue, 11 Apr 2017 04:57:04 +0300 Subject: [PATCH] Survival: Better warmup weapons. --- .../mutators/mutator/gamemode_survival.qc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/qcsrc/server/mutators/mutator/gamemode_survival.qc b/qcsrc/server/mutators/mutator/gamemode_survival.qc index fddb598fa..ab60f01b9 100644 --- a/qcsrc/server/mutators/mutator/gamemode_survival.qc +++ b/qcsrc/server/mutators/mutator/gamemode_survival.qc @@ -1084,6 +1084,23 @@ void Surv_GiveStartWeapons(entity player) return; } int numweapons = tokenize_console(cvar_string(randomweaponlist)); + if (warmup_stage) + { + // Give all weapons during warmup stage. + for (int i = 0; i < numweapons; ++i) + { + string weapon = argv(i); + FOREACH(Weapons, it != WEP_Null, + { + if (it.netname == weapon) + { + player.weapons |= it.m_wepset; + break; + } + }); + } + return; + } for (int i = 0; i < numrandomweapons; ++i) { // Finding weapon which player doesn't have. @@ -1372,6 +1389,7 @@ MUTATOR_HOOKFUNCTION(surv, SetWeaponArena) MUTATOR_HOOKFUNCTION(surv, SetStartItems) { start_weapons = WEPSET(Null); + warmup_start_weapons = WEPSET(Null); } MUTATOR_HOOKFUNCTION(surv, SV_StartFrame) -- 2.39.5