vector vf, vr, vu;
WarpZone_trace_firstzone = world;
+ WarpZone_trace_lastzone = world;
WarpZone_Trace_InitTransform();
if(!warpzone_warpzones_exist)
{
if(wz)
{
WarpZone_trace_firstzone = wz;
+ WarpZone_trace_lastzone = wz;
if(zone && wz != zone)
{
// we are in ANOTHER warpzone. This is bad. Make a zero length trace and return.
break;
}
wz = trace_ent;
- WarpZone_trace_firstzone = wz;
+ if(!WarpZone_trace_firstzone)
+ WarpZone_trace_firstzone = wz;
+ WarpZone_trace_lastzone = wz;
if(zone && wz != zone)
break;
WarpZone_Trace_AddTransform(wz);
o0 = e.origin;
v0 = e.velocity;
- WarpZone_Trace_InitTransform();
WarpZone_trace_firstzone = world;
+ WarpZone_trace_lastzone = world;
+ WarpZone_Trace_InitTransform();
WarpZone_tracetoss_time = 0;
if(!warpzone_warpzones_exist)
{
if(wz)
{
WarpZone_trace_firstzone = wz;
+ WarpZone_trace_lastzone = wz;
if(zone && wz != zone)
{
// we are in ANOTHER warpzone. This is bad. Make a zero length trace and return.
break;
}
wz = trace_ent;
- WarpZone_trace_firstzone = wz;
+ if(!WarpZone_trace_firstzone)
+ WarpZone_trace_firstzone = wz;
+ WarpZone_trace_lastzone = wz;
if(zone && wz != zone)
break;
WarpZone_Trace_AddTransform(wz);
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)
+entity WarpZone_trace_lastzone; // 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);