mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-13 07:57:51 +00:00
- fixed: Offsetting a vector by portals did not properly adjust the trace after crossing a portal.
This commit is contained in:
parent
cd75a46917
commit
eb30bf6e14
1 changed files with 3 additions and 1 deletions
|
@ -661,10 +661,10 @@ DVector2 P_GetOffsetPosition(double x, double y, double dx, double dy)
|
||||||
if (blockx < 0 || blocky < 0 || blockx >= bmapwidth || blocky >= bmapheight || !PortalBlockmap(blockx, blocky).neighborContainsLines) return dest;
|
if (blockx < 0 || blocky < 0 || blockx >= bmapwidth || blocky >= bmapheight || !PortalBlockmap(blockx, blocky).neighborContainsLines) return dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
FLinePortalTraverse it;
|
|
||||||
bool repeat;
|
bool repeat;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
FLinePortalTraverse it;
|
||||||
it.init(actx, acty, dx, dy, PT_ADDLINES|PT_DELTA);
|
it.init(actx, acty, dx, dy, PT_ADDLINES|PT_DELTA);
|
||||||
intercept_t *in;
|
intercept_t *in;
|
||||||
|
|
||||||
|
@ -696,6 +696,8 @@ DVector2 P_GetOffsetPosition(double x, double y, double dx, double dy)
|
||||||
// update the fields, end this trace and restart from the new position
|
// update the fields, end this trace and restart from the new position
|
||||||
dx = dest.X - hit.X;
|
dx = dest.X - hit.X;
|
||||||
dy = dest.Y - hit.Y;
|
dy = dest.Y - hit.Y;
|
||||||
|
actx = hit.X;
|
||||||
|
acty = hit.Y;
|
||||||
repeat = true;
|
repeat = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue