This commit is contained in:
parent
77387f13d9
commit
a6793bff97
@ -149,7 +149,7 @@ void CNpcFlyingDutchmanEnemy::processMovement( int _frames )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_movementTimer = GameState::getOneSecondInFrames() * 3;
|
m_movementTimer = GameState::getOneSecondInFrames() * 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -216,7 +216,8 @@ void CNpcFlyingDutchmanEnemy::processClose( int _frames )
|
|||||||
m_animPlaying = true;
|
m_animPlaying = true;
|
||||||
m_frame = 0;
|
m_frame = 0;
|
||||||
}
|
}
|
||||||
else if ( !m_animPlaying )
|
//else if ( !m_animPlaying )
|
||||||
|
else if ( m_frame > ( getFrameCount() >> 1 ) )
|
||||||
{
|
{
|
||||||
// fire at player
|
// fire at player
|
||||||
|
|
||||||
@ -248,7 +249,7 @@ void CNpcFlyingDutchmanEnemy::processClose( int _frames )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
||||||
m_movementTimer = GameState::getOneSecondInFrames() * 3;
|
m_movementTimer = GameState::getOneSecondInFrames() * 2;
|
||||||
|
|
||||||
m_state++;
|
m_state++;
|
||||||
m_inRange = false;
|
m_inRange = false;
|
||||||
@ -279,7 +280,7 @@ void CNpcFlyingDutchmanEnemy::processClose( int _frames )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
||||||
m_movementTimer = GameState::getOneSecondInFrames() * 3;
|
m_movementTimer = GameState::getOneSecondInFrames() * 2;
|
||||||
m_state = FLYING_DUTCHMAN_ATTACK_PLAYER_1;
|
m_state = FLYING_DUTCHMAN_ATTACK_PLAYER_1;
|
||||||
m_inRange = false;
|
m_inRange = false;
|
||||||
|
|
||||||
@ -313,6 +314,17 @@ void CNpcFlyingDutchmanEnemy::processClose( int _frames )
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void CNpcFlyingDutchmanEnemy::processShotRecoil( int _frames )
|
||||||
|
{
|
||||||
|
if ( !m_animPlaying )
|
||||||
|
{
|
||||||
|
m_state = m_oldState;
|
||||||
|
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void CNpcFlyingDutchmanEnemy::processShotDeathEnd( int _frames )
|
void CNpcFlyingDutchmanEnemy::processShotDeathEnd( int _frames )
|
||||||
{
|
{
|
||||||
if ( !m_animPlaying )
|
if ( !m_animPlaying )
|
||||||
@ -422,6 +434,7 @@ void CNpcFlyingDutchmanEnemy::collidedWith(CThing *_thisThing)
|
|||||||
player->justButtBouncedABadGuy();
|
player->justButtBouncedABadGuy();
|
||||||
}
|
}
|
||||||
m_controlFunc = NPC_CONTROL_SHOT;
|
m_controlFunc = NPC_CONTROL_SHOT;
|
||||||
|
m_oldState = m_state;
|
||||||
m_state = NPC_GENERIC_HIT_CHECK_HEALTH;
|
m_state = NPC_GENERIC_HIT_CHECK_HEALTH;
|
||||||
|
|
||||||
drawAttackEffect();
|
drawAttackEffect();
|
||||||
@ -463,6 +476,7 @@ u8 CNpcFlyingDutchmanEnemy::hasBeenAttacked()
|
|||||||
m_invulnerableTimer = 4 * GameState::getOneSecondInFrames();
|
m_invulnerableTimer = 4 * GameState::getOneSecondInFrames();
|
||||||
|
|
||||||
m_controlFunc = NPC_CONTROL_SHOT;
|
m_controlFunc = NPC_CONTROL_SHOT;
|
||||||
|
m_oldState = m_state;
|
||||||
m_state = NPC_GENERIC_HIT_CHECK_HEALTH;
|
m_state = NPC_GENERIC_HIT_CHECK_HEALTH;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
virtual void processClose( int _frames );
|
virtual void processClose( int _frames );
|
||||||
virtual void processMovement( int _frames );
|
virtual void processMovement( int _frames );
|
||||||
|
virtual void processShotRecoil( int _frames );
|
||||||
virtual void processShotDeathEnd( int _frames );
|
virtual void processShotDeathEnd( int _frames );
|
||||||
virtual void collidedWith(CThing *_thisThing);
|
virtual void collidedWith(CThing *_thisThing);
|
||||||
|
|
||||||
@ -44,6 +45,7 @@ protected:
|
|||||||
u8 m_inRange;
|
u8 m_inRange;
|
||||||
u8 m_fireCount;
|
u8 m_fireCount;
|
||||||
s32 m_invulnerableTimer;
|
s32 m_invulnerableTimer;
|
||||||
|
u8 m_oldState;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue
Block a user