]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a debug check for an issue I noticed earlier, need it resolved
authorSamual Lenks <samual@xonotic.org>
Mon, 10 Sep 2012 07:00:35 +0000 (03:00 -0400)
committerSamual Lenks <samual@xonotic.org>
Mon, 10 Sep 2012 07:00:35 +0000 (03:00 -0400)
qcsrc/server/mutators/gamemode_ctf.qc

index ad047a221c5ab65976d1a97b2ba218d40b3dc39c..f5ecce93647a14e13083bdc5357cc339f2c289f6 100644 (file)
@@ -812,8 +812,15 @@ void ctf_FlagTouch()
        }
 }
 
+.float last_respawn;
 void ctf_RespawnFlag(entity flag)
 {
+       // check for flag respawn being called twice in a row
+       if(flag.last_respawn > time - 0.5)
+               { backtrace("flag respawn called twice quickly!"); }
+
+       flag.last_respawn = time;
+       
        // reset the player (if there is one)
        if((flag.owner) && (flag.owner.flagcarried == flag))
        {