From eb5e00a0a7e7f80789edca383982424991a918a4 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 25 May 2001 20:51:17 +0000 Subject: [PATCH] --- source/platform/psbarrel.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/platform/psbarrel.cpp b/source/platform/psbarrel.cpp index 296b543e8..374238275 100644 --- a/source/platform/psbarrel.cpp +++ b/source/platform/psbarrel.cpp @@ -97,6 +97,22 @@ void CNpcSteerableBarrelPlatform::processMovement( int _frames ) Pos.vx += moveX; Pos.vy += moveY; + + s32 minX, maxX; + + m_npcPath.getPathXExtents( &minX, &maxX ); + + if ( minX != maxX ) + { + if ( Pos.vx < minX ) + { + Pos.vx = minX; + } + else if ( Pos.vx > maxX ) + { + Pos.vx = maxX; + } + } } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////