From d1f84d57527bcec7e3b3341216dcb6f09c92fd8f Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 4 May 2015 00:45:26 +1000 Subject: [PATCH] Support old one-flag CTF maps, hide flag from carrier while driving a vehicle --- qcsrc/server/mutators/gamemode_ctf.qc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qcsrc/server/mutators/gamemode_ctf.qc b/qcsrc/server/mutators/gamemode_ctf.qc index a42f2919a..0b3a3dff9 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qc +++ b/qcsrc/server/mutators/gamemode_ctf.qc @@ -2130,6 +2130,8 @@ MUTATOR_HOOKFUNCTION(ctf_VehicleEnter) { if(vh_player.flagcarried) { + vh_player.flagcarried.nodrawtoclient = vh_player; // hide the flag from the driver + if(!autocvar_g_ctf_allow_vehicle_carry && !autocvar_g_ctf_allow_vehicle_touch) { ctf_Handle_Throw(vh_player, world, DROP_NORMAL); @@ -2155,6 +2157,7 @@ MUTATOR_HOOKFUNCTION(ctf_VehicleExit) setorigin(vh_player.flagcarried, FLAG_CARRY_OFFSET); vh_player.flagcarried.scale = FLAG_SCALE; vh_player.flagcarried.angles = '0 0 0'; + vh_player.flagcarried.nodrawtoclient = world; return true; } @@ -2390,6 +2393,9 @@ void spawnfunc_team_CTF_blueplayer() { spawnfunc_info_player_team2(); } void spawnfunc_team_CTF_redspawn() { spawnfunc_info_player_team1(); } void spawnfunc_team_CTF_bluespawn() { spawnfunc_info_player_team2(); } +void team_CTF_neutralflag() { spawnfunc_item_flag_neutral(); } +void team_neutralobelisk() { spawnfunc_item_flag_neutral(); } + // ============== // Initialization -- 2.39.2