entity wz;
vector vf, vr, vu;
+ WarpZone_trace_firstzone = world;
WarpZone_Trace_InitTransform();
if(!warpzone_warpzones_exist)
{
wz = WarpZone_Find(org + mi, org + ma);
if(wz)
{
+ WarpZone_trace_firstzone = wz;
if(zone && wz != zone)
{
// we are in ANOTHER warpzone. This is bad. Make a zero length trace and return.
}
if(trace_ent == wz)
{
+ // FIXME can this check be removed? Do we really need it?
dprint("I transformed into the same zone again, wtf, aborting the trace\n");
trace_ent = world;
break;
}
wz = trace_ent;
+ WarpZone_trace_firstzone = wz;
if(zone && wz != zone)
break;
WarpZone_Trace_AddTransform(wz);
v0 = e.velocity;
WarpZone_Trace_InitTransform();
+ WarpZone_trace_firstzone = world;
WarpZone_tracetoss_time = 0;
if(!warpzone_warpzones_exist)
{
wz = WarpZone_Find(e.origin + e.mins, e.origin + e.maxs);
if(wz)
{
+ WarpZone_trace_firstzone = wz;
if(zone && wz != zone)
{
// we are in ANOTHER warpzone. This is bad. Make a zero length trace and return.
break;
if(trace_ent == wz)
{
+ // FIXME can this check be removed? Do we really need it?
dprint("I transformed into the same zone again, wtf, aborting the trace\n");
trace_ent = world;
break;
}
wz = trace_ent;
+ WarpZone_trace_firstzone = wz;
if(zone && wz != zone)
break;
WarpZone_Trace_AddTransform(wz);
typedef void(vector start, vector hit, vector end) WarpZone_trace_callback_t; // called on every elementary trace
const var WarpZone_trace_callback_t WarpZone_trace_callback_t_null;
entity WarpZone_trace_transform; // transform accumulator during a trace
+entity WarpZone_trace_firstzone; // first warpzone hit by a trace (can differ from the requested zone in case of _ThroughZone, the trace is aborted then)
vector WarpZone_tracetoss_velocity; // ending velocity of a tracetoss (post-transform)
float WarpZone_tracetoss_time; // duration of toss (approximate)
void WarpZone_TraceBox(vector org, vector min, vector max, vector end, float nomonsters, entity forent);