mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +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;
|
||||
}
|
||||
|
||||
FLinePortalTraverse it;
|
||||
bool repeat;
|
||||
do
|
||||
{
|
||||
FLinePortalTraverse it;
|
||||
it.init(actx, acty, dx, dy, PT_ADDLINES|PT_DELTA);
|
||||
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
|
||||
dx = dest.X - hit.X;
|
||||
dy = dest.Y - hit.Y;
|
||||
actx = hit.X;
|
||||
acty = hit.Y;
|
||||
repeat = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue