This commit is contained in:
parent
488c311c93
commit
e505d2ba5f
5 changed files with 57 additions and 13 deletions
|
@ -1456,6 +1456,21 @@ void CNpcEnemy::processEnemyCollision( CThing *thisThing )
|
|||
|
||||
Pos.vx += otherDelta.vx;
|
||||
|
||||
if ( m_npcPath.getWaypointCount() )
|
||||
{
|
||||
s32 minX, maxX;
|
||||
m_npcPath.getPathXExtents( &minX, &maxX );
|
||||
|
||||
if ( Pos.vx < minX )
|
||||
{
|
||||
Pos.vx = minX;
|
||||
}
|
||||
else if ( Pos.vx > maxX )
|
||||
{
|
||||
Pos.vx = maxX;
|
||||
}
|
||||
}
|
||||
|
||||
s32 groundHeight = m_layerCollision->getHeightFromGround( Pos.vx, Pos.vy, 16 );
|
||||
|
||||
if ( groundHeight < 8 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue