This commit is contained in:
parent
e399f8ad11
commit
78366ab3e4
1 changed files with 51 additions and 0 deletions
|
@ -253,6 +253,11 @@ void CNpcMotherJellyfishEnemy::processMovement( int _frames )
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pauseTimer -= _frames;
|
m_pauseTimer -= _frames;
|
||||||
|
|
||||||
|
if ( m_soundId == NOT_PLAYING )
|
||||||
|
{
|
||||||
|
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_JELLYFISH_ATTACK, true );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -261,6 +266,11 @@ void CNpcMotherJellyfishEnemy::processMovement( int _frames )
|
||||||
|
|
||||||
m_renderScale = 2048 + ( ( ( 4096 - 2048 ) * m_health ) / m_data[m_type].initHealth );
|
m_renderScale = 2048 + ( ( ( 4096 - 2048 ) * m_health ) / m_data[m_type].initHealth );
|
||||||
m_renderScale += ( ( 256 * rsin( ( ( m_pulsateTimer << 14 ) / GameState::getOneSecondInFrames() ) & 4095 ) ) >> 12 );
|
m_renderScale += ( ( 256 * rsin( ( ( m_pulsateTimer << 14 ) / GameState::getOneSecondInFrames() ) & 4095 ) ) >> 12 );
|
||||||
|
|
||||||
|
if ( m_soundId == NOT_PLAYING )
|
||||||
|
{
|
||||||
|
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_NAUTILUS_ATTACK, true );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -298,6 +308,22 @@ void CNpcMotherJellyfishEnemy::processMovement( int _frames )
|
||||||
{
|
{
|
||||||
processGenericGotoTarget( _frames, distX, distY, m_speed );
|
processGenericGotoTarget( _frames, distX, distY, m_speed );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( m_movementTimer > 0 )
|
||||||
|
{
|
||||||
|
if ( m_soundId == NOT_PLAYING )
|
||||||
|
{
|
||||||
|
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_JELLYFISH_MOVE, true );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( m_soundId != NOT_PLAYING )
|
||||||
|
{
|
||||||
|
CSoundMediator::stopAndUnlockSfx( (xmPlayingId) m_soundId );
|
||||||
|
m_soundId = NOT_PLAYING;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -320,6 +346,11 @@ void CNpcMotherJellyfishEnemy::processMovement( int _frames )
|
||||||
m_extension = 0;
|
m_extension = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( m_soundId == NOT_PLAYING )
|
||||||
|
{
|
||||||
|
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_JELLYFISH_MOVE, true );
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -341,6 +372,11 @@ void CNpcMotherJellyfishEnemy::processMovement( int _frames )
|
||||||
m_state = MOTHER_JELLYFISH_EXIT;
|
m_state = MOTHER_JELLYFISH_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( m_soundId == NOT_PLAYING )
|
||||||
|
{
|
||||||
|
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_JELLYFISH_MOVE, true );
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -357,6 +393,11 @@ void CNpcMotherJellyfishEnemy::processMovement( int _frames )
|
||||||
CGameScene::setBossHasBeenKilled();
|
CGameScene::setBossHasBeenKilled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( m_soundId == NOT_PLAYING )
|
||||||
|
{
|
||||||
|
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_JELLYFISH_MOVE, true );
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -384,6 +425,11 @@ void CNpcMotherJellyfishEnemy::processMovement( int _frames )
|
||||||
processGenericGotoTarget( _frames, distX, distY, m_speed );
|
processGenericGotoTarget( _frames, distX, distY, m_speed );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( m_soundId == NOT_PLAYING )
|
||||||
|
{
|
||||||
|
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_JELLYFISH_MOVE, true );
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -398,6 +444,11 @@ void CNpcMotherJellyfishEnemy::processMovement( int _frames )
|
||||||
m_RGB = MJ_PINK;
|
m_RGB = MJ_PINK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( m_soundId == NOT_PLAYING )
|
||||||
|
{
|
||||||
|
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_JELLYFISH_ATTACK, true );
|
||||||
|
}
|
||||||
|
|
||||||
s32 distX, distY;
|
s32 distX, distY;
|
||||||
|
|
||||||
distX = targetPos.vx - Pos.vx;
|
distX = targetPos.vx - Pos.vx;
|
||||||
|
|
Loading…
Add table
Reference in a new issue