This commit is contained in:
parent
6c98c057a8
commit
9dc0ce319e
3 changed files with 41 additions and 21 deletions
|
@ -34,6 +34,15 @@ void CNpcEnemy::processFlyingDutchmanMovement( int _frames )
|
|||
{
|
||||
m_movementTimer -= _frames;
|
||||
|
||||
s32 xDist = m_extension - Pos.vx;
|
||||
s32 xDistSqr = xDist * xDist;
|
||||
|
||||
if ( xDistSqr > 100 )
|
||||
{
|
||||
processGenericGotoTarget( _frames, xDist, 0, m_data[m_type].speed );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( m_extendDir == EXTEND_UP )
|
||||
{
|
||||
s32 yDist = -10 - Pos.vy;
|
||||
|
@ -63,6 +72,7 @@ void CNpcEnemy::processFlyingDutchmanMovement( int _frames )
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_controlFunc = NPC_CONTROL_CLOSE;
|
||||
|
@ -129,6 +139,15 @@ void CNpcEnemy::processCloseFlyingDutchmanAttack( int _frames )
|
|||
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
||||
m_movementTimer = GameState::getOneSecondInFrames() * 3;
|
||||
m_state = FLYING_DUTCHMAN_ATTACK_PLAYER_1;
|
||||
|
||||
if ( m_extension == 100 )
|
||||
{
|
||||
m_extension = 400;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_extension = 100;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
@ -209,7 +209,7 @@ void CNpcEnemy::init()
|
|||
{
|
||||
CEnemyThing::init();
|
||||
|
||||
m_type = NPC_SUB_SHARK;
|
||||
m_type = NPC_FLYING_DUTCHMAN;
|
||||
|
||||
// sActorHdr *Hdr = m_skel.Load( m_data[m_type].skelType );
|
||||
// m_skel.Init( Hdr );
|
||||
|
@ -233,7 +233,7 @@ void CNpcEnemy::init()
|
|||
|
||||
m_health = m_data[this->m_type].initHealth;
|
||||
|
||||
m_extension = EXTEND_RIGHT;
|
||||
m_extendDir = EXTEND_RIGHT;
|
||||
|
||||
Pos.vx = 400;
|
||||
Pos.vy = 100;
|
||||
|
@ -307,6 +307,7 @@ void CNpcEnemy::init()
|
|||
{
|
||||
m_state = FLYING_DUTCHMAN_ATTACK_PLAYER_1;
|
||||
m_extendDir = EXTEND_UP;
|
||||
m_extension = 100;
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -731,7 +731,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
|||
NPC_TIMER_NONE,
|
||||
false,
|
||||
3,
|
||||
256,
|
||||
2048,
|
||||
false,
|
||||
DAMAGE__HIT_ENEMY,
|
||||
256,
|
||||
|
|
Loading…
Add table
Reference in a new issue