This commit is contained in:
parent
ad643eda78
commit
fe30bb578f
@ -236,7 +236,8 @@ void CNpcFlyingDutchmanEnemy::processClose( int _frames )
|
||||
DVECTOR newPos = Pos;
|
||||
newPos.vy -= 50;
|
||||
projectile->init( newPos, heading );
|
||||
projectile->setGraphic( FRM__LIGHTNING2 );
|
||||
projectile->setGraphic( FRM__SNAKEBILE );
|
||||
projectile->setSpeed( 5 );
|
||||
|
||||
m_fireCount++;
|
||||
|
||||
@ -312,15 +313,6 @@ void CNpcFlyingDutchmanEnemy::processClose( int _frames )
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcFlyingDutchmanEnemy::processShotRecoil( int _frames )
|
||||
{
|
||||
m_invulnerableTimer = 2 * GameState::getOneSecondInFrames();
|
||||
|
||||
CNpcEnemy::processShotRecoil( _frames );
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcFlyingDutchmanEnemy::processShotDeathEnd( int _frames )
|
||||
{
|
||||
CNpcEnemy::processShotDeathEnd( _frames );
|
||||
@ -430,6 +422,8 @@ void CNpcFlyingDutchmanEnemy::collidedWith(CThing *_thisThing)
|
||||
m_state = NPC_GENERIC_HIT_CHECK_HEALTH;
|
||||
|
||||
drawAttackEffect();
|
||||
|
||||
m_invulnerableTimer = 2 * GameState::getOneSecondInFrames();
|
||||
}
|
||||
}
|
||||
|
||||
@ -454,3 +448,21 @@ void CNpcFlyingDutchmanEnemy::collidedWith(CThing *_thisThing)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
u8 CNpcFlyingDutchmanEnemy::hasBeenAttacked()
|
||||
{
|
||||
if ( m_invulnerableTimer <= 0 )
|
||||
{
|
||||
if ( m_controlFunc != NPC_CONTROL_SHOT )
|
||||
{
|
||||
m_invulnerableTimer = 2 * GameState::getOneSecondInFrames();
|
||||
|
||||
m_controlFunc = NPC_CONTROL_SHOT;
|
||||
m_state = NPC_GENERIC_HIT_CHECK_HEALTH;
|
||||
}
|
||||
}
|
||||
|
||||
return( true );
|
||||
}
|
||||
|
@ -26,10 +26,10 @@ public:
|
||||
virtual void postInit();
|
||||
void render();
|
||||
virtual void shutdown();
|
||||
virtual u8 hasBeenAttacked();
|
||||
protected:
|
||||
virtual void processClose( int _frames );
|
||||
virtual void processMovement( int _frames );
|
||||
virtual void processShotRecoil( int _frames );
|
||||
virtual void processShotDeathEnd( int _frames );
|
||||
virtual void collidedWith(CThing *_thisThing);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user