]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/warpzone/server.qc
Remove various SELFPARAM
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / warpzone / server.qc
index 97abe0e6d14f4e9c9f833d5ad504d71463e6e902..0fb8dd235ff99033e04148fa9662ff9764ee43cc 100644 (file)
@@ -173,7 +173,7 @@ float WarpZone_Teleport(entity wz, entity player, float f0, float f1)
                ts.SendEntity3 = WarpZone_Teleported_Send;
                ts.SendFlags = 0xFFFFFF;
                ts.drawonlytoclient = player;
-               ts.think = SUB_Remove_self;
+               setthink(ts, SUB_Remove);
                ts.nextthink = time + 1;
                ts.owner = player;
                ts.enemy = wz;
@@ -190,8 +190,8 @@ float WarpZone_Teleport(entity wz, entity player, float f0, float f1)
        return 1;
 }
 
-void WarpZone_Touch ()
-{SELFPARAM();
+void WarpZone_Touch (entity this)
+{
        if(other.classname == "trigger_warpzone")
                return;
 
@@ -363,7 +363,7 @@ bool WarpZone_Camera_Send(entity this, entity to, int sendflags)
 
 #ifdef WARPZONELIB_KEEPDEBUG
 float WarpZone_CheckProjectileImpact(entity player)
-{SELFPARAM();
+{
        vector o0, v0;
 
        .vector orgvec, velvec;
@@ -435,8 +435,8 @@ float WarpZone_CheckProjectileImpact(entity player)
 #endif
 #endif
 
-float WarpZone_Projectile_Touch()
-{SELFPARAM();
+float WarpZone_Projectile_Touch(entity this)
+{
        if(other.classname == "trigger_warpzone")
                return true;
 
@@ -479,9 +479,8 @@ float WarpZone_Projectile_Touch()
                save_ent = trace_ent;
                save_inopen = trace_inopen;
                save_inwater = trace_inwater;
-               float f;
-               if((f = WarpZone_CheckProjectileImpact(this)) != 0)
-                       return (f > 0);
+               float f = WarpZone_CheckProjectileImpact(this);
+               if (f) return (f > 0);
                trace_dpstartcontents = save_dpstartcontents;
                trace_dphitcontents = save_dphitcontents;
                trace_dphitq3surfaceflags = save_dphitq3surfaceflags;
@@ -543,8 +542,8 @@ void WarpZonePosition_InitStep_FindTarget(entity this)
        this.enemy.aiment = this;
 }
 
-void WarpZoneCamera_Think()
-{SELFPARAM();
+void WarpZoneCamera_Think(entity this)
+{
        if(this.warpzone_save_origin != this.origin
        || this.warpzone_save_angles != this.angles
        || this.warpzone_save_eorigin != this.enemy.origin
@@ -582,7 +581,7 @@ void WarpZoneCamera_InitStep_FindTarget(entity this)
        this.SendFlags = 0xFFFFFF;
        if(this.spawnflags & 1)
        {
-               this.think = WarpZoneCamera_Think;
+               setthink(this, WarpZoneCamera_Think);
                this.nextthink = time;
        }
        else
@@ -708,7 +707,7 @@ void WarpZone_InitStep_FindTarget(entity this)
        }
 }
 
-void WarpZone_Think();
+void WarpZone_Think(entity this);
 void WarpZone_InitStep_FinalizeTransform(entity this)
 {
        if(!this.enemy || this.enemy.enemy != this)
@@ -719,11 +718,11 @@ void WarpZone_InitStep_FinalizeTransform(entity this)
 
        warpzone_warpzones_exist = 1;
        WarpZone_SetUp(this, this.warpzone_origin, this.warpzone_angles, this.enemy.warpzone_origin, this.enemy.warpzone_angles);
-       this.touch = WarpZone_Touch;
+       settouch(this, WarpZone_Touch);
        this.SendFlags = 0xFFFFFF;
        if(this.spawnflags & 1)
        {
-               this.think = WarpZone_Think;
+               setthink(this, WarpZone_Think);
                this.nextthink = time;
        }
        else
@@ -817,8 +816,8 @@ void WarpZones_Reconnect()
                WarpZone_InitStep_FinalizeTransform(e);
 }
 
-void WarpZone_Think()
-{SELFPARAM();
+void WarpZone_Think(entity this)
+{
        if(this.warpzone_save_origin != this.origin
        || this.warpzone_save_angles != this.angles
        || this.warpzone_save_eorigin != this.enemy.origin