From ce607085bc5684e0066498289cc4c19b2dab1bb6 Mon Sep 17 00:00:00 2001 From: FruitieX Date: Sun, 12 Dec 2010 12:51:12 +0200 Subject: [PATCH] per-gametype weapon_stay cvars. Enable weapon stay by default in: CTF, Assault, CTS, Freezetag --- defaultXonotic.cfg | 16 ++++++++++++++++ qcsrc/server/miscfunctions.qc | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 3585d26fe..03882aeff 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -596,40 +596,56 @@ set g_respawn_waves 0 "respawn in waves (every n seconds), intended to decrease // to force disable delay or waves, set them to 0.125 set g_ctf_respawn_delay 0 set g_ctf_respawn_waves 0 +set g_ctf_weapon_stay 1 set g_dm_respawn_delay 0 set g_dm_respawn_waves 0 +set g_dm_weapon_stay 0 set g_dom_respawn_delay 0 set g_dom_respawn_waves 0 +set g_dom_weapon_stay 0 set g_lms_respawn_delay 0 set g_lms_respawn_waves 0 +set g_lms_weapon_stay 0 set g_rune_respawn_delay 0 set g_rune_respawn_waves 0 +set g_rune_weapon_stay 0 set g_tdm_respawn_delay 0 set g_tdm_respawn_waves 0 +set g_tdm_weapon_stay 0 set g_kh_respawn_delay 0 set g_kh_respawn_waves 0 +set g_kh_weapon_stay 0 set g_arena_respawn_delay 0 set g_arena_respawn_waves 0 +set g_arena_weapon_stay 0 set g_ca_respawn_delay 0 set g_ca_respawn_waves 0 +set g_ca_weapon_stay 0 set g_ca_damage2score_multiplier 0.01 set g_ca_round_timelimit 180 set g_nexball_respawn_delay 0 set g_nexball_respawn_waves 0 +set g_nexball_weapon_stay 0 set g_as_respawn_delay 0 set g_as_respawn_waves 0 +set g_as_weapon_stay 1 set g_ons_respawn_delay 0 set g_ons_respawn_waves 0 +set g_ons_weapon_stay 0 set g_rc_respawn_waves 0 set g_rc_respawn_delay 0 +set g_rc_weapon_stay 0 set g_cts_respawn_waves 0 set g_cts_respawn_delay 0.25 set g_cts_selfdamage 1 "0 = disable all selfdamage and falldamage in cts" set g_cts_finish_kill_delay 10 "prevent cheating by running back to the start line, and starting out with more speed than otherwise possible" +set g_cts_weapon_stay 1 set g_freezetag_respawn_waves 0 set g_freezetag_respawn_delay 0.25 +set g_freezetag_weapon_stay 1 set g_ka_respawn_delay 0 set g_ka_respawn_waves 0 +set g_ka_weapon_stay 0 // overtime seta timelimit_overtime 2 "duration in minutes of one added overtime, added to the timelimit" diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 11c97cc11..445c5eb38 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -1297,7 +1297,9 @@ void readlevelcvars(void) g_pinata = cvar("g_pinata"); - g_weapon_stay = cvar("g_weapon_stay"); + g_weapon_stay = cvar(strcat("g_", GetGametype(), "_weapon_stay")); + if(!g_weapon_stay) + g_weapon_stay = cvar("g_weapon_stay"); if (!g_weapon_stay && (cvar("deathmatch") == 2)) g_weapon_stay = 1; -- 2.39.2