X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fgamemode_ctf.qc;h=c2189155c421299f254533c88393dfb8b4851bae;hb=8643336b62c2c2881987dabddc842a0214839012;hp=d8a4e357bbde7ea69a37477d28e710bcb6956a6e;hpb=61a847dbaab291d205cc9684b6d1a6e9bdad6375;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/mutators/gamemode_ctf.qc b/qcsrc/server/mutators/gamemode_ctf.qc index d8a4e357b..c2189155c 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qc +++ b/qcsrc/server/mutators/gamemode_ctf.qc @@ -10,11 +10,6 @@ #include "../../warpzonelib/common.qh" #include "../../warpzonelib/mathlib.qh" -// ================================================================ -// Official capture the flag game mode coding, reworked by Samual -// Last updated: September, 2012 -// ================================================================ - void ctf_FakeTimeLimit(entity e, float t) { msg_entity = e; @@ -26,7 +21,7 @@ void ctf_FakeTimeLimit(entity e, float t) WriteCoord(MSG_ONE, (t + 1) / 60); } -void ctf_EventLog(string mode, float flagteam, entity actor) // use an alias for easy changing and quick editing later +void ctf_EventLog(string mode, int flagteam, entity actor) // use an alias for easy changing and quick editing later { if(autocvar_sv_eventlog) GameLogEcho(strcat(":ctf:", mode, ":", ftos(flagteam), ((actor != world) ? (strcat(":", ftos(actor.playerid))) : ""))); @@ -92,7 +87,7 @@ void ctf_CalculatePassVelocity(entity flag, vector to, vector from, float turnra else { flag.velocity = (desired_direction * autocvar_g_ctf_pass_velocity); } } -float ctf_CheckPassDirection(vector head_center, vector passer_center, vector passer_angle, vector nearest_to_passer) +bool ctf_CheckPassDirection(vector head_center, vector passer_center, vector passer_angle, vector nearest_to_passer) { if(autocvar_g_ctf_pass_directional_max || autocvar_g_ctf_pass_directional_min) { @@ -126,7 +121,7 @@ float ctf_CheckPassDirection(vector head_center, vector passer_center, vector pa // CaptureShield Functions // ======================= -float ctf_CaptureShield_CheckStatus(entity p) +bool ctf_CaptureShield_CheckStatus(entity p) { float s, se; entity e; @@ -961,6 +956,7 @@ void ctf_DelayedFlagSetup(void) // called after a flag is placed on a map by ctf self.bot_basewaypoint = self.nearestwaypoint; // waypointsprites + // move_origin isnt accessible just yet WaypointSprite_SpawnFixed(((self.team == NUM_TEAM_1) ? "redbase" : "bluebase"), self.origin + FLAG_WAYPOINT_OFFSET, self, wps_flagbase, RADARICON_FLAG, colormapPaletteColor(self.team - 1, false)); WaypointSprite_UpdateTeamRadar(self.wps_flagbase, RADARICON_FLAG, colormapPaletteColor(self.team - 1, false));