This commit is contained in:
parent
19b1e7dc2c
commit
3fad61a8f9
@ -42,6 +42,7 @@ void CNpcFlyingDutchmanEnemy::postInit()
|
|||||||
|
|
||||||
s32 minX, maxX;
|
s32 minX, maxX;
|
||||||
m_npcPath.getPathXExtents( &minX, &maxX );
|
m_npcPath.getPathXExtents( &minX, &maxX );
|
||||||
|
m_npcPath.getPathYExtents( &m_minY, &m_maxY );
|
||||||
|
|
||||||
m_extension = minX;
|
m_extension = minX;
|
||||||
}
|
}
|
||||||
@ -70,7 +71,7 @@ void CNpcFlyingDutchmanEnemy::processMovement( int _frames )
|
|||||||
{
|
{
|
||||||
if ( m_extendDir == EXTEND_UP )
|
if ( m_extendDir == EXTEND_UP )
|
||||||
{
|
{
|
||||||
s32 yDist = -10 - Pos.vy;
|
s32 yDist = m_minY - Pos.vy;
|
||||||
s32 yDistSqr = yDist * yDist;
|
s32 yDistSqr = yDist * yDist;
|
||||||
|
|
||||||
if ( yDistSqr > 100 )
|
if ( yDistSqr > 100 )
|
||||||
@ -84,7 +85,7 @@ void CNpcFlyingDutchmanEnemy::processMovement( int _frames )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
s32 yDist = 400 - Pos.vy;
|
s32 yDist = m_maxY - Pos.vy;
|
||||||
s32 yDistSqr = yDist * yDist;
|
s32 yDistSqr = yDist * yDist;
|
||||||
|
|
||||||
if ( yDistSqr > 100 )
|
if ( yDistSqr > 100 )
|
||||||
|
@ -28,6 +28,8 @@ protected:
|
|||||||
FLYING_DUTCHMAN_ATTACK_PLAYER_2 = 1,
|
FLYING_DUTCHMAN_ATTACK_PLAYER_2 = 1,
|
||||||
FLYING_DUTCHMAN_ATTACK_PLAYER_3,
|
FLYING_DUTCHMAN_ATTACK_PLAYER_3,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
s32 m_minY, m_maxY;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -108,7 +108,8 @@ void CNpcPath::addWaypoint( DVECTOR newPos )
|
|||||||
|
|
||||||
currentWaypoint = this->waypoint;
|
currentWaypoint = this->waypoint;
|
||||||
|
|
||||||
minX = maxX = minY = maxY = newPos.vx;
|
minX = maxX = newPos.vx;
|
||||||
|
minY = maxY = newPos.vy;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user