From facbca36197dc305ab289ea190df5579a8bd8f0f Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Thu, 14 Feb 2013 23:27:09 +0000 Subject: [PATCH] - 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) --- src/p_map.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/p_map.cpp b/src/p_map.cpp index 7cdf90ee8..ad678b529 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -2516,10 +2516,17 @@ 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.