From ad1729bd8b56b054466689731f0a2f59f13e55ee Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Thu, 17 Oct 2013 16:25:14 -0400 Subject: [PATCH] Add feature to warmup_allguns which only provides weapons in the map --- defaultXonotic.cfg | 2 +- qcsrc/server/cl_client.qc | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index d967d53d5..2e0586672 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -237,7 +237,7 @@ set g_maxplayers_spectator_blocktime 5 "if the players voted for the \"nospectat set g_warmup 0 "split the game into a warmup- and match-stage when set to 1" set g_warmup_limit 0 "if set to -1 the warmup-stage is not affected by any timelimit, if set to 0 the usual timelimit also affects warmup-stage, otherwise warmup will be limited to this time in SECONDS (useful for public matches)" set g_warmup_allow_timeout 0 "if set to 1 timeouts can also be called in the warmup-stage, when sv_timeout is set to 1" -set g_warmup_allguns 1 "if set players start with all guns in warmup mode" +set g_warmup_allguns 1 "provide more weapons on start while in warmup: 0 = normal start weapons, 1 = all guns available on the map, 2 = all normal weapons" set g_warmup_majority_factor 0.8 "minimum percentage of players ready needed for warmup to end" set g_chat_nospectators 0 "if 0 spec/observer chat is always visible to the player, if 1 it is never visible to players, if 2 it is only visible to players during warmup stage" diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index fac4314ca..d53fe2082 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -439,7 +439,11 @@ void PutClientInServer (void) self.ammo_fuel = warmup_start_ammo_fuel; self.health = warmup_start_health; self.armorvalue = warmup_start_armorvalue; - self.weapons = warmup_start_weapons; + + if(g_warmup_allguns == 2) + self.weapons = warmup_start_weapons; + else if(g_warmup_allguns == 1) + self.weapons = (warmup_start_weapons & (weaponsInMap | start_weapons)); } else { -- 2.39.2