]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/warpzone/server.qc
Step 6: complete
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / warpzone / server.qc
index c8a241f97dd82e680234403cd9142acea6fbe7aa..a84b7a73984219626a7a91b3d2d62e6abd18d397 100644 (file)
@@ -169,8 +169,7 @@ float WarpZone_Teleport(entity wz, entity player, float f0, float f1)
 
                entity ts = new(warpzone_teleported);
                setmodel(ts, MDL_Null);
-               ts.SendEntity = SendEntity_self;
-               ts.SendEntity3 = WarpZone_Teleported_Send;
+               setSendEntity(ts, WarpZone_Teleported_Send);
                ts.SendFlags = 0xFFFFFF;
                ts.drawonlytoclient = player;
                setthink(ts, SUB_Remove);
@@ -206,7 +205,7 @@ void WarpZone_Touch (entity this)
 #endif
                return;
 
-       if(WarpZoneLib_ExactTrigger_Touch(self, other))
+       if(WarpZoneLib_ExactTrigger_Touch(this, other))
                return;
 
 #ifdef SVQC
@@ -363,7 +362,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 +434,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 +478,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;
@@ -498,7 +496,7 @@ float WarpZone_Projectile_Touch()
        }
 #endif
 
-       if(WarpZone_Projectile_Touch_ImpactFilter_Callback())
+       if(WarpZone_Projectile_Touch_ImpactFilter_Callback(this, other))
                return true;
 #endif
 
@@ -772,8 +770,7 @@ spawnfunc(trigger_warpzone)
                setsize(this, this.mins * this.scale, this.maxs * this.scale);
        else
                setsize(this, this.mins, this.maxs);
-       this.SendEntity = SendEntity_self;
-       this.SendEntity3 = WarpZone_Send;
+       setSendEntity(this, WarpZone_Send);
        this.SendFlags = 0xFFFFFF;
        BITSET_ASSIGN(this.effects, EF_NODEPTHTEST);
        this.warpzone_next = warpzone_first;
@@ -799,8 +796,7 @@ spawnfunc(func_camera)
                this.solid = SOLID_BSP;
        else if(this.solid < 0)
                this.solid = SOLID_NOT;
-       this.SendEntity = SendEntity_self;
-       this.SendEntity3 = WarpZone_Camera_Send;
+       setSendEntity(this, WarpZone_Camera_Send);
        this.SendFlags = 0xFFFFFF;
        this.warpzone_next = warpzone_camera_first;
        warpzone_camera_first = this;