This commit is contained in:
Charles 2001-05-03 22:15:13 +00:00
parent 19b1e7dc2c
commit 3fad61a8f9
3 changed files with 7 additions and 3 deletions

View File

@ -42,6 +42,7 @@ void CNpcFlyingDutchmanEnemy::postInit()
s32 minX, maxX;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &m_minY, &m_maxY );
m_extension = minX;
}
@ -70,7 +71,7 @@ void CNpcFlyingDutchmanEnemy::processMovement( int _frames )
{
if ( m_extendDir == EXTEND_UP )
{
s32 yDist = -10 - Pos.vy;
s32 yDist = m_minY - Pos.vy;
s32 yDistSqr = yDist * yDist;
if ( yDistSqr > 100 )
@ -84,7 +85,7 @@ void CNpcFlyingDutchmanEnemy::processMovement( int _frames )
}
else
{
s32 yDist = 400 - Pos.vy;
s32 yDist = m_maxY - Pos.vy;
s32 yDistSqr = yDist * yDist;
if ( yDistSqr > 100 )

View File

@ -28,6 +28,8 @@ protected:
FLYING_DUTCHMAN_ATTACK_PLAYER_2 = 1,
FLYING_DUTCHMAN_ATTACK_PLAYER_3,
};
s32 m_minY, m_maxY;
};
#endif

View File

@ -108,7 +108,8 @@ void CNpcPath::addWaypoint( DVECTOR newPos )
currentWaypoint = this->waypoint;
minX = maxX = minY = maxY = newPos.vx;
minX = maxX = newPos.vx;
minY = maxY = newPos.vy;
}
}