From: Samual Lenks Date: Thu, 17 Oct 2013 20:25:14 +0000 (-0400) Subject: Add feature to warmup_allguns which only provides weapons in the map X-Git-Tag: xonotic-v0.8.0~278^2 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=ad1729bd8b56b054466689731f0a2f59f13e55ee;hp=-c Add feature to warmup_allguns which only provides weapons in the map --- ad1729bd8b56b054466689731f0a2f59f13e55ee diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index d967d53d55..2e05866726 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 fac4314ca6..d53fe20823 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 {