mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 12:32:34 +00:00
- Fixed: If you hit a wall at the right moment you would some times come out of a teleporter with sliding velocity.
SVN r4137 (trunk)
This commit is contained in:
parent
7714a45e02
commit
facbca3619
1 changed files with 8 additions and 1 deletions
|
@ -2517,9 +2517,16 @@ void FSlide::SlideMove (AActor *mo, fixed_t tryx, fixed_t tryy, int numsteps)
|
||||||
newx = FixedMul (tryx, bestslidefrac);
|
newx = FixedMul (tryx, bestslidefrac);
|
||||||
newy = FixedMul (tryy, bestslidefrac);
|
newy = FixedMul (tryy, bestslidefrac);
|
||||||
|
|
||||||
|
// [BL] We need to abandon this function if we end up going through a teleporter
|
||||||
|
const fixed_t startvelx = mo->velx;
|
||||||
|
const fixed_t startvely = mo->vely;
|
||||||
|
|
||||||
// killough 3/15/98: Allow objects to drop off ledges
|
// killough 3/15/98: Allow objects to drop off ledges
|
||||||
if (!P_TryMove (mo, mo->x+newx, mo->y+newy, true))
|
if (!P_TryMove (mo, mo->x+newx, mo->y+newy, true))
|
||||||
goto stairstep;
|
goto stairstep;
|
||||||
|
|
||||||
|
if (mo->velx != startvelx || mo->vely != startvely)
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now continue along the wall.
|
// Now continue along the wall.
|
||||||
|
|
Loading…
Reference in a new issue