e.warpzone_targetorigin = other_org;
e.warpzone_angles = my_ang;
e.warpzone_targetangles = other_ang;
- FIXED_MAKE_VECTORS_NEW(my_ang, forward, right, up);
+ vector forward, right, up;
+ FIXED_MAKE_VECTORS(my_ang, forward, right, up);
e.warpzone_forward = forward;
FIXED_MAKE_VECTORS(other_ang, forward, right, up);
e.warpzone_targetforward = forward;
float frac, sol, i;
float contentshack;
entity wz;
+ vector vf, vr, vu;
WarpZone_trace_forent = forent;
WarpZone_trace_firstzone = NULL;
}
}
+ vf = v_forward;
+ vr = v_right;
+ vu = v_up;
+
switch(nomonsters)
{
case MOVE_WORLDONLY:
if(contentshack)
BITCLR_ASSIGN(WarpZone_trace_forent.dphitcontentsmask, DPCONTENTS_SOLID);
trace_startsolid = sol;
+ v_forward = vf;
+ v_right = vr;
+ v_up = vu;
}
void WarpZone_TraceBox(vector org, vector mi, vector ma, vector end, float nomonsters, entity forent)
bool WarpZoneLib_ExactTrigger_Touch(entity this, entity toucher)
{
- return !WarpZoneLib_BoxTouchesBrush(toucher.absmin, toucher.absmax, this, toucher);
+ vector emin = toucher.absmin, emax = toucher.absmax;
+ // the engine offsets absolute bounding boxes by a single quake unit
+ // we must undo that here to allow accurate touching
+ emin += '1 1 1';
+ emax -= '1 1 1';
+ return !WarpZoneLib_BoxTouchesBrush(emin, emax, this, toucher);
}
void WarpZoneLib_MoveOutOfSolid_Expand(entity e, vector by)
{
- float eps = 0.0625;
+ const float eps = 0.0625;
tracebox(e.origin, e.mins - '1 1 1' * eps, e.maxs + '1 1 1' * eps, e.origin + by, MOVE_WORLDONLY, e);
if (trace_startsolid)
return;