This commit is contained in:
Charles 2001-06-28 20:29:14 +00:00
parent d3062a046c
commit b19db66ed5
13 changed files with 177 additions and 649 deletions

View file

@ -428,6 +428,7 @@ void CNpcIronDogfishEnemy::hasBeenSteamed( DVECTOR &steamPos )
//hasBeenAttacked();
m_steamTimer = 4 * GameState::getOneSecondInFrames();
m_effect->killFX();
}
}
@ -445,119 +446,15 @@ void CNpcIronDogfishEnemy::processTimer(int _frames)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcIronDogfishEnemy::processShot( int _frames )
void CNpcIronDogfishEnemy::processShotDeathEnd( int _frames )
{
switch( m_data[m_type].shotFunc )
if ( !m_animPlaying )
{
case NPC_SHOT_NONE:
CNpcEnemy::processShotDeathEnd( _frames );
if ( isSetToShutdown() )
{
// do nothing
break;
}
case NPC_SHOT_GENERIC:
{
switch ( m_state )
{
case NPC_GENERIC_HIT_CHECK_HEALTH:
{
m_health -= 5;
if ( m_health < 0 )
{
m_state = NPC_GENERIC_HIT_DEATH_START;
m_isDying = true;
}
else
{
m_state = NPC_GENERIC_HIT_RECOIL;
m_animPlaying = true;
m_animNo = m_data[m_type].recoilAnim;
m_frame = 0;
}
break;
}
case NPC_GENERIC_HIT_RECOIL:
{
if ( !m_animPlaying )
{
m_state = 0;
m_controlFunc = NPC_CONTROL_MOVEMENT;
}
break;
}
case NPC_GENERIC_HIT_DEATH_START:
{
m_animPlaying = true;
m_animNo = m_data[m_type].dieAnim;
m_frame = 0;
m_state = NPC_GENERIC_HIT_DEATH_END;
m_isDying = true;
if ( m_data[m_type].deathSfx < CSoundMediator::NUM_SFXIDS )
{
if( m_soundId != NOT_PLAYING )
{
CSoundMediator::stopAndUnlockSfx( (xmPlayingId) m_soundId );
}
m_soundId = (int) CSoundMediator::playSfx( m_data[m_type].deathSfx, true );
}
m_speed = -5;
if (m_data[m_type].skelType)
{
m_actorGfx->SetOtPos( 0 );
}
break;
}
case NPC_GENERIC_HIT_DEATH_END:
{
if ( !m_animPlaying )
{
m_drawRotation += 64 * _frames;
m_drawRotation &= 4095;
Pos.vy += m_speed * _frames;
if ( m_speed < 5 )
{
m_speed++;
}
DVECTOR offset = CLevel::getCameraPos();
if ( Pos.vy - offset.vy > VidGetScrH() )
{
if ( m_data[m_type].respawning )
{
m_isActive = false;
m_timerFunc = NPC_TIMER_RESPAWN;
m_timerTimer = 4 * GameState::getOneSecondInFrames();
}
else
{
setToShutdown();
CGameScene::setBossHasBeenKilled();
}
}
}
break;
}
}
break;
CGameScene::setBossHasBeenKilled();
}
}
}