From dc63e94433a320330cb4df547b9dcc4c7e791224 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 30 Aug 2015 23:16:43 +1000 Subject: [PATCH] Add an option to use team spawns in keyhunt --- gamemodes.cfg | 1 + qcsrc/server/autocvars.qh | 1 + qcsrc/server/teamplay.qc | 2 ++ 3 files changed, 4 insertions(+) diff --git a/gamemodes.cfg b/gamemodes.cfg index 340d01b9d..31a0f33d3 100644 --- a/gamemodes.cfg +++ b/gamemodes.cfg @@ -438,6 +438,7 @@ set g_balance_keyhunt_protecttime 0.8 set g_balance_keyhunt_damageforcescale 1 seta g_keyhunt_teams_override 0 set g_keyhunt_teams 0 +set g_keyhunt_team_spawns 0 "when 1, players spawn from the team spawnpoints of the map, if any" // =================== diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 9bbcb1823..354926600 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -369,6 +369,7 @@ int autocvar_g_keepawayball_effects; float autocvar_g_keepawayball_respawntime; int autocvar_g_keepawayball_trail_color; int autocvar_g_keyhunt_point_leadlimit; +bool autocvar_g_keyhunt_team_spawns; #define autocvar_g_keyhunt_point_limit cvar("g_keyhunt_point_limit") int autocvar_g_keyhunt_teams; int autocvar_g_keyhunt_teams_override; diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index b14386bd4..c7703e2e5 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -141,6 +141,8 @@ void InitGameplayMode() ActivateTeamplay(); fraglimit_override = autocvar_g_keyhunt_point_limit; leadlimit_override = autocvar_g_keyhunt_point_leadlimit; + if(autocvar_g_keyhunt_team_spawns) + have_team_spawns = -1; // request team spawns MUTATOR_ADD(gamemode_keyhunt); } -- 2.39.2