From: Mario Date: Sun, 3 May 2015 14:45:26 +0000 (+1000) Subject: Support old one-flag CTF maps, hide flag from carrier while driving a vehicle X-Git-Tag: xonotic-v0.8.1~29^2~8 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d1f84d57527bcec7e3b3341216dcb6f09c92fd8f;p=xonotic%2Fxonotic-data.pk3dir.git Support old one-flag CTF maps, hide flag from carrier while driving a vehicle --- 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