This commit is contained in:
parent
85c497b6cf
commit
eb5e00a0a7
1 changed files with 16 additions and 0 deletions
|
@ -97,6 +97,22 @@ void CNpcSteerableBarrelPlatform::processMovement( int _frames )
|
||||||
|
|
||||||
Pos.vx += moveX;
|
Pos.vx += moveX;
|
||||||
Pos.vy += moveY;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue