X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Flib%2Fwarpzone%2Fcommon.qc;h=120551b4e3595dccc9506f4fea2908639c4095cf;hb=06a08d0c6b573f2562297147171aff3d990fa42d;hp=82d3a50719356083ae96fbb18d691dfc2b9f83df;hpb=5c9f51cd3a9f0b63733ee7b81649e81872a86765;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/lib/warpzone/common.qc b/qcsrc/lib/warpzone/common.qc index 82d3a5071..120551b4e 100644 --- a/qcsrc/lib/warpzone/common.qc +++ b/qcsrc/lib/warpzone/common.qc @@ -71,8 +71,11 @@ void WarpZone_SetUp(entity e, vector my_org, vector my_ang, vector other_org, ve e.warpzone_targetorigin = other_org; e.warpzone_angles = my_ang; e.warpzone_targetangles = other_ang; - fixedmakevectors(my_ang); e.warpzone_forward = v_forward; - fixedmakevectors(other_ang); e.warpzone_targetforward = v_forward; + 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; setcamera_transform(e, WarpZone_camera_transform); } @@ -201,7 +204,6 @@ void WarpZone_TraceBox_ThroughZone(vector org, vector mi, vector ma, vector end, float nomonsters_adjusted; float frac, sol, i; float contentshack; - vector o0, e0; entity wz; vector vf, vr, vu; @@ -231,8 +233,6 @@ void WarpZone_TraceBox_ThroughZone(vector org, vector mi, vector ma, vector end, vf = v_forward; vr = v_right; vu = v_up; - o0 = org; - e0 = end; switch(nomonsters) { @@ -786,13 +786,18 @@ entity WarpZone_RefSys_SpawnSameRefSys(entity me) 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;