]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/ctf.qc
fix stupid typos :P
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / ctf.qc
index f5835377d982ea2ded4998baf629d3711883b787..d84075cf4c959b725d97de65c6d85b2ec498dcf5 100644 (file)
@@ -416,6 +416,7 @@ void flag_cap_ring_spawn(vector org)
        shockwave_spawn("models/ctf/shockwavetransring.md3", org - '0 0 15', -0.8, 0, 1);
 }
 
+// TODO add FlagDamage, replace weird hurttrigger handling inside trigger_hurt code by it
 void FlagTouch()
 {
        if(gameover) return;
@@ -423,14 +424,24 @@ void FlagTouch()
        float t;
        entity player;
        string s, s0, h0, h1;
+
+       if (self.cnt == FLAG_CARRY)
+               return;
+
+       if (self.cnt == FLAG_DROPPED)
+       {
+               if(ITEM_TOUCH_NEEDKILL())
+               {
+                       self.pain_finished = 0; // return immediately
+                       return;
+               }
+       }
+
        if (other.classname != "player")
                return;
        if (other.health < 1) // ignore dead players
                return;
 
-       if (self.cnt == FLAG_CARRY)
-               return;
-
        if (self.cnt == FLAG_BASE)
        if (other.team == self.team)
        if (other.flagcarried) // he's got a flag