- 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:
Braden Obrzut 2013-02-14 23:27:09 +00:00
parent 7714a45e02
commit facbca3619

View file

@ -2517,9 +2517,16 @@ void FSlide::SlideMove (AActor *mo, fixed_t tryx, fixed_t tryy, int numsteps)
newx = FixedMul (tryx, 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
if (!P_TryMove (mo, mo->x+newx, mo->y+newy, true))
goto stairstep;
if (mo->velx != startvelx || mo->vely != startvely)
return;
}
// Now continue along the wall.