From: Mario Date: Thu, 20 Mar 2014 02:23:25 +0000 (+1100) Subject: Fix flag getting stuck on maps like tron with spawn in the ground and noalign key... X-Git-Tag: xonotic-v0.8.0~197^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a1f6bbc269a4f8853b855ffd94993a7620d4c0b1;p=xonotic%2Fxonotic-data.pk3dir.git Fix flag getting stuck on maps like tron with spawn in the ground and noalign key set, fix unmanned vehicles crashing the server in CTF --- diff --git a/qcsrc/server/mutators/gamemode_ctf.qc b/qcsrc/server/mutators/gamemode_ctf.qc index 66c7b8715..b8419624f 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qc +++ b/qcsrc/server/mutators/gamemode_ctf.qc @@ -656,7 +656,7 @@ void ctf_FlagThink() if(self.mins != FLAG_MIN || self.maxs != FLAG_MAX) { // reset the flag boundaries in case it got squished dprint("wtf the flag got squashed?\n"); tracebox(self.origin, FLAG_MIN, FLAG_MAX, self.origin, MOVE_NOMONSTERS, self); - if(!trace_startsolid) // can we resize it without getting stuck? + if(!trace_startsolid || self.noalign) // 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 @@ -793,7 +793,7 @@ void ctf_FlagTouch() // special touch behaviors if(toucher.vehicle_flags & VHF_ISVEHICLE) { - if(autocvar_g_ctf_allow_vehicle_touch) + if(autocvar_g_ctf_allow_vehicle_touch && toucher.owner) toucher = toucher.owner; // the player is actually the vehicle owner, not other else return; // do nothing