vr = WarpZone_TransformVelocity(this, vr);
vu = WarpZone_TransformVelocity(this, vu);
if(autocvar_cl_warpzone_usetrace)
- traceline(this.warpzone_targetorigin, org, MOVE_NOMONSTERS, world);
+ traceline(this.warpzone_targetorigin, org, MOVE_NOMONSTERS, NULL);
else
trace_endpos = this.warpzone_targetorigin;
v_forward = vf;
// if we are near any warpzone planes - MOVE AWAY (work around nearclip)
entity e;
if(!warpzone_warpzones_exist)
- return world;
- for(e = world; (e = find(e, classname, "trigger_warpzone")); )
- if(WarpZoneLib_BoxTouchesBrush(mi, ma, e, world))
+ return NULL;
+ for(e = NULL; (e = find(e, classname, "trigger_warpzone")); )
+ if(WarpZoneLib_BoxTouchesBrush(mi, ma, e, NULL))
return e;
- return world;
+ return NULL;
}
void WarpZone_MakeAllSolid()
entity e;
if(!warpzone_warpzones_exist)
return;
- for(e = world; (e = find(e, classname, "trigger_warpzone")); )
+ for(e = NULL; (e = find(e, classname, "trigger_warpzone")); )
e.solid = SOLID_BSP;
}
entity e;
if(!warpzone_warpzones_exist)
return;
- for(e = world; (e = find(e, classname, "trigger_warpzone")); )
+ for(e = NULL; (e = find(e, classname, "trigger_warpzone")); )
e.solid = SOLID_TRIGGER;
}
vector vf, vr, vu;
WarpZone_trace_forent = forent;
- WarpZone_trace_firstzone = world;
- WarpZone_trace_lastzone = world;
+ WarpZone_trace_firstzone = NULL;
+ WarpZone_trace_lastzone = NULL;
WarpZone_Trace_InitTransform();
if(!warpzone_warpzones_exist)
{
if(--i < 1)
{
LOG_TRACE("Too many warpzones in sequence, aborting trace.\n");
- trace_ent = world;
+ trace_ent = NULL;
break;
}
tracebox(org, mi, ma, end, nomonsters_adjusted, WarpZone_trace_forent);
{
// FIXME can this check be removed? Do we really need it?
LOG_TRACE("I transformed into the same zone again, wtf, aborting the trace\n");
- trace_ent = world;
+ trace_ent = NULL;
break;
}
wz = trace_ent;
void WarpZone_TraceBox(vector org, vector mi, vector ma, vector end, float nomonsters, entity forent)
{
- WarpZone_TraceBox_ThroughZone(org, mi, ma, end, nomonsters, forent, world, WarpZone_trace_callback_t_null);
+ WarpZone_TraceBox_ThroughZone(org, mi, ma, end, nomonsters, forent, NULL, WarpZone_trace_callback_t_null);
}
void WarpZone_TraceLine(vector org, vector end, float nomonsters, entity forent)
g = cvar("sv_gravity") * e.gravity;
WarpZone_trace_forent = forent;
- WarpZone_trace_firstzone = world;
- WarpZone_trace_lastzone = world;
+ WarpZone_trace_firstzone = NULL;
+ WarpZone_trace_lastzone = NULL;
WarpZone_Trace_InitTransform();
WarpZone_tracetoss_time = 0;
if(!warpzone_warpzones_exist)
if(--i < 1)
{
LOG_TRACE("Too many warpzones in sequence, aborting trace.\n");
- trace_ent = world;
+ trace_ent = NULL;
break;
}
tracetoss(e, WarpZone_trace_forent);
{
// FIXME can this check be removed? Do we really need it?
LOG_TRACE("I transformed into the same zone again, wtf, aborting the trace\n");
- trace_ent = world;
+ trace_ent = NULL;
break;
}
wz = trace_ent;
void WarpZone_TraceToss(entity e, entity forent)
{
- WarpZone_TraceToss_ThroughZone(e, forent, world, WarpZone_trace_callback_t_null);
+ WarpZone_TraceToss_ThroughZone(e, forent, NULL, WarpZone_trace_callback_t_null);
}
entity WarpZone_TrailParticles_trace_callback_own;
{
WarpZone_TrailParticles_trace_callback_own = own;
WarpZone_TrailParticles_trace_callback_eff = eff;
- WarpZone_TraceBox_ThroughZone(org, '0 0 0', '0 0 0', end, MOVE_NOMONSTERS, world, world, WarpZone_TrailParticles_trace_callback);
+ WarpZone_TraceBox_ThroughZone(org, '0 0 0', '0 0 0', end, MOVE_NOMONSTERS, NULL, NULL, WarpZone_TrailParticles_trace_callback);
}
#ifdef CSQC
WarpZone_TrailParticles_trace_callback_eff = eff;
WarpZone_TrailParticles_trace_callback_f = f;
WarpZone_TrailParticles_trace_callback_flags = boxflags | PARTICLES_DRAWASTRAIL;
- WarpZone_TraceBox_ThroughZone(org, '0 0 0', '0 0 0', end, MOVE_NOMONSTERS, world, world, WarpZone_TrailParticles_WithMultiplier_trace_callback);
+ WarpZone_TraceBox_ThroughZone(org, '0 0 0', '0 0 0', end, MOVE_NOMONSTERS, NULL, NULL, WarpZone_TrailParticles_WithMultiplier_trace_callback);
}
#endif
if(me.WarpZone_refsys)
{
remove(me.WarpZone_refsys);
- me.WarpZone_refsys = world;
+ me.WarpZone_refsys = NULL;
}
}
void WarpZone_RefSys_AddTransform(entity me, vector t, vector s)