From fd2c62823f02535e625379e9a278176c1f8ed402 Mon Sep 17 00:00:00 2001 From: Samual Date: Mon, 2 Apr 2012 17:57:46 -0400 Subject: [PATCH] Clean up something in FlagThink method --- qcsrc/server/mutators/gamemode_ctf.qc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/qcsrc/server/mutators/gamemode_ctf.qc b/qcsrc/server/mutators/gamemode_ctf.qc index 2d6a3ee13..1710cf092 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qc +++ b/qcsrc/server/mutators/gamemode_ctf.qc @@ -558,6 +558,18 @@ void ctf_FlagThink() tracebox(self.origin, FLAG_MIN, FLAG_MAX, self.origin, MOVE_NOMONSTERS, self); if(!trace_startsolid) // can we resize it without getting stuck? setsize(self, FLAG_MIN, FLAG_MAX); } + + switch(self.ctf_status) // reset flag angles in case warpzones adjust it + { + case FLAG_DROPPED: + case FLAG_PASSING: + { + self.angles = '0 0 0'; + break; + } + + default: break; + } // main think method switch(self.ctf_status) @@ -576,7 +588,6 @@ void ctf_FlagThink() case FLAG_DROPPED: { - self.angles = '0 0 0'; // in case warpzones adjust it if(autocvar_g_ctf_flag_dropped_floatinwater && (self.flags & FL_INWATER)) self.velocity_z = autocvar_g_ctf_flag_dropped_floatinwater; @@ -639,9 +650,7 @@ void ctf_FlagThink() } case FLAG_PASSING: // todo make work with warpzones - { - self.angles = '0 0 0'; // in case warpzones adjust it - + { vector targ_origin = ((self.pass_target.absmin + self.pass_target.absmax) * 0.5); traceline(self.origin, targ_origin, MOVE_NOMONSTERS, self); -- 2.39.2