]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/subs.qc
Fix CTF flags secretly spamming squashed messages, and fix a potential crash in clien...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / subs.qc
index a71267b0cc5d047d59b01d2e30d739e23421250c..67eb18a6782b84f54abedd8813e258c51b846fb4 100644 (file)
@@ -1,3 +1,4 @@
+#include "subs.qh"
 void SUB_NullThink(entity this) { }
 
 void SUB_CalcMoveDone(entity this);
@@ -14,7 +15,7 @@ Applies some friction to this
 void SUB_Friction (entity this)
 {
        this.SUB_NEXTTHINK = time;
-       if(this.SUB_FLAGS & FL_ONGROUND)
+       if(IS_ONGROUND(this))
                this.SUB_VELOCITY = this.SUB_VELOCITY * (1 - frametime * this.friction);
 }
 
@@ -40,7 +41,7 @@ void SUB_VanishOrRemove (entity ent)
        else
        {
                // remove
-               remove (ent);
+               delete (ent);
        }
 }
 
@@ -144,8 +145,8 @@ void SUB_CalcMove_controller_think (entity this)
                // derivative: delta + 2 * delta2 (e.g. for angle positioning)
                entity own = this.owner;
                SUB_THINK(own, this.think1);
-               remove(this);
-               WITHSELF(own, SUB_THUNK(own)(own));
+               delete(this);
+               SUB_THUNK(own)(own);
        }
 }
 
@@ -236,7 +237,7 @@ void SUB_CalcMove_Bezier (entity this, vector tcontrol, vector tdest, float tspe
        this.SUB_NEXTTHINK = this.SUB_LTIME + traveltime;
 
        // invoke controller
-       WITHSELF(controller, getthink(controller)(controller));
+       getthink(controller)(controller);
 }
 
 void SUB_CalcMove (entity this, vector tdest, float tspeedtype, float tspeed, void(entity this) func)