]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/jumppads.qc
Clean up some of the turret code's self uses
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / jumppads.qc
index 44413a9c4b9171f8182c0cf8a04f9de0b08e8e24..9e16c4ef06e128312859f57a16a3076cd10a9158 100644 (file)
@@ -129,8 +129,8 @@ vector trigger_push_calculatevelocity(vector org, entity tgt, float ht)
        return sdir * vs + '0 0 1' * vz;
 }
 
-void trigger_push_touch()
-{SELFPARAM();
+void trigger_push_touch(entity this)
+{
        if (this.active == ACTIVE_NOT)
                return;
 
@@ -262,15 +262,15 @@ void trigger_push_touch()
 
        if (this.spawnflags & PUSH_ONCE)
        {
-               this.touch = func_null;
-               this.think = SUB_Remove_self;
+               settouch(this, func_null);
+               setthink(this, SUB_Remove);
                this.nextthink = time;
        }
 #endif
 }
 
 #ifdef SVQC
-void trigger_push_link();
+void trigger_push_link(entity this);
 void trigger_push_updatelink(entity this);
 #endif
 void trigger_push_findtarget(entity this)
@@ -331,7 +331,7 @@ void trigger_push_findtarget(entity this)
                remove(e);
        }
 
-       trigger_push_link();
+       trigger_push_link(this);
        defer(this, 0.1, trigger_push_updatelink);
 #endif
 }
@@ -356,9 +356,8 @@ void trigger_push_updatelink(entity this)
        this.SendFlags |= 1;
 }
 
-void trigger_push_link()
+void trigger_push_link(entity this)
 {
-    SELFPARAM();
        trigger_link(this, trigger_push_send);
 }
 
@@ -382,7 +381,7 @@ spawnfunc(trigger_push)
 
        this.active = ACTIVE_ACTIVE;
        this.use = trigger_push_use;
-       this.touch = trigger_push_touch;
+       settouch(this, trigger_push_touch);
 
        // normal push setup
        if (!this.speed)
@@ -443,13 +442,11 @@ NET_HANDLE(ENT_CLIENT_TRIGGER_PUSH, bool isnew)
        this.active = ReadByte();
        this.height = ReadCoord();
 
-       trigger_common_read(true);
+       trigger_common_read(this, true);
 
        this.entremove = trigger_remove_generic;
        this.solid = SOLID_TRIGGER;
-       //this.draw = trigger_draw_generic;
-       this.move_touch = trigger_push_touch;
-       this.drawmask = MASK_NORMAL;
+       settouch(this, trigger_push_touch);
        this.move_time = time;
        defer(this, 0.25, trigger_push_findtarget);