vector WarpZone_camera_transform(vector org, vector ang)
{SELFPARAM();
vector vf, vr, vu;
- if(self.warpzone_fadestart)
- if(vdist(org - self.origin - 0.5 * (self.mins + self.maxs), >, self.warpzone_fadeend + 400))
+ if(this.warpzone_fadestart)
+ if(vdist(org - this.origin - 0.5 * (this.mins + this.maxs), >, this.warpzone_fadeend + 400))
return org;
// don't transform if zone faded out (plus 400qu safety margin for typical speeds and latencies)
// unneeded on client, on server this helps a lot
vf = v_forward;
vr = v_right;
vu = v_up;
- org = WarpZone_TransformOrigin(self, org);
- vf = WarpZone_TransformVelocity(self, vf);
- vr = WarpZone_TransformVelocity(self, vr);
- vu = WarpZone_TransformVelocity(self, vu);
+ org = WarpZone_TransformOrigin(this, org);
+ vf = WarpZone_TransformVelocity(this, vf);
+ vr = WarpZone_TransformVelocity(this, vr);
+ vu = WarpZone_TransformVelocity(this, vu);
if(autocvar_cl_warpzone_usetrace)
- traceline(self.warpzone_targetorigin, org, MOVE_NOMONSTERS, world);
+ traceline(this.warpzone_targetorigin, org, MOVE_NOMONSTERS, world);
else
- trace_endpos = self.warpzone_targetorigin;
+ trace_endpos = this.warpzone_targetorigin;
v_forward = vf;
v_right = vr;
v_up = vu;
vector WarpZone_Camera_camera_transform(vector org, vector ang)
{SELFPARAM();
// a fixed camera view
- if(self.warpzone_fadestart)
- if(vdist(org - self.origin - 0.5 * (self.mins + self.maxs), >, self.warpzone_fadeend + 400))
+ if(this.warpzone_fadestart)
+ if(vdist(org - this.origin - 0.5 * (this.mins + this.maxs), >, this.warpzone_fadeend + 400))
return org;
// don't transform if zone faded out (plus 400qu safety margin for typical speeds and latencies)
// unneeded on client, on server this helps a lot
- trace_endpos = self.warpzone_origin;
- makevectors(self.warpzone_angles);
- return self.warpzone_origin;
+ trace_endpos = this.warpzone_origin;
+ makevectors(this.warpzone_angles);
+ return this.warpzone_origin;
}
void WarpZone_Camera_SetUp(entity e, vector my_org, vector my_ang) // we assume that e.oldorigin and e.avelocity point to view origin and direction
void WarpZone_RefSys_GC()
{SELFPARAM();
// garbage collect unused reference systems
- self.nextthink = time + 1;
- if(self.owner.WarpZone_refsys != self)
- remove(self);
+ this.nextthink = time + 1;
+ if(this.owner.WarpZone_refsys != this)
+ remove(this);
}
void WarpZone_RefSys_CheckCreate(entity me)
{
float WarpZoneLib_ExactTrigger_Touch()
{SELFPARAM();
- return !WarpZoneLib_BoxTouchesBrush(other.absmin, other.absmax, self, other);
+ return !WarpZoneLib_BoxTouchesBrush(other.absmin, other.absmax, this, other);
}