This commit is contained in:
parent
441dbbef00
commit
4731a653ba
3 changed files with 21 additions and 4 deletions
|
@ -35,6 +35,13 @@ void CNpcButterflyBackgroundEnemy::processMovementModifier(int _frames, s32 dist
|
|||
m_animPlaying = true;
|
||||
m_frame = 0;
|
||||
}
|
||||
|
||||
CLevel &level = GameScene.GetLevel();
|
||||
if ( Pos.vx < 0 || Pos.vx > ( level.getCollisionLayer()->getMapWidth() << 4 ) ||
|
||||
Pos.vy < 0 || Pos.vy > ( level.getCollisionLayer()->getMapHeight() << 4 ) )
|
||||
{
|
||||
setToShutdown();
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -162,6 +162,14 @@ void CNpcSmallJellyfishBackgroundEnemy::processMovement( int _frames )
|
|||
}*/
|
||||
|
||||
processMovementModifier( _frames, moveX, moveY, moveVel, moveDist );
|
||||
|
||||
CLevel &level = GameScene.GetLevel();
|
||||
DVECTOR const &MapSize=level.getMapSize16();
|
||||
if ( Pos.vx < 0 || Pos.vx >= MapSize.vx ||
|
||||
Pos.vy < 0 || Pos.vy >= MapSize.vy )
|
||||
{
|
||||
setToShutdown();
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -406,8 +406,9 @@ void CProjectile::think(int _frames)
|
|||
}
|
||||
|
||||
CLevel &level = GameScene.GetLevel();
|
||||
if ( Pos.vx < 0 || Pos.vx > ( level.getCollisionLayer()->getMapWidth() << 4 ) ||
|
||||
Pos.vy < 0 || Pos.vy > ( level.getCollisionLayer()->getMapHeight() << 4 ) )
|
||||
DVECTOR const &MapSize=level.getMapSize16();
|
||||
if ( Pos.vx < 0 || Pos.vx >= MapSize.vx ||
|
||||
Pos.vy < 0 || Pos.vy >= MapSize.vy )
|
||||
{
|
||||
setToShutdown();
|
||||
}
|
||||
|
@ -733,8 +734,9 @@ void CPlayerProjectile::think(int _frames)
|
|||
}
|
||||
|
||||
CLevel &level = GameScene.GetLevel();
|
||||
if ( Pos.vx < 0 || Pos.vx > ( level.getCollisionLayer()->getMapWidth() << 4 ) ||
|
||||
Pos.vy < 0 || Pos.vy > ( level.getCollisionLayer()->getMapHeight() << 4 ) )
|
||||
DVECTOR const &MapSize=level.getMapSize16();
|
||||
if ( Pos.vx < 0 || Pos.vx >= MapSize.vx ||
|
||||
Pos.vy < 0 || Pos.vy >= MapSize.vy )
|
||||
{
|
||||
setToShutdown();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue