This commit is contained in:
Charles 2001-08-17 13:06:42 +00:00
parent 022c8cb201
commit 797cdc7ee2
3 changed files with 17 additions and 0 deletions

View File

@ -202,6 +202,23 @@ void CNpcFlyingDutchmanEnemy::processClose( int _frames )
m_extendDir = EXTEND_UP;
}
CPlayer *player = GameScene.getPlayer();
DVECTOR const &playerPos = player->getPos();
s32 minX, maxX;
m_npcPath.getPathXExtents( &minX, &maxX );
if ( playerPos.vx < minX || playerPos.vx > maxX ||
playerPos.vy < m_minY || playerPos.vy > m_maxY )
{
if ( m_state != FLYING_DUTCHMAN_RETURN )
{
m_state = FLYING_DUTCHMAN_RETURN;
m_timerTimer = 2 * GameState::getOneSecondInFrames();
}
}
if ( !m_inRange )
{
if ( playerYDistSqr > 100 )