diff --git a/source/enemy/nsshark.cpp b/source/enemy/nsshark.cpp index 942fcc948..cf1c06dd8 100644 --- a/source/enemy/nsshark.cpp +++ b/source/enemy/nsshark.cpp @@ -226,7 +226,8 @@ void CNpcSubSharkEnemy::processMovement( int _frames ) if( abs( distY ) == 0 ) { m_state = SUB_SHARK_START_CHARGE; - m_timerTimer = GameState::getOneSecondInFrames(); + m_timerTimer = GameState::getOneSecondInFrames() >> 8; + m_movementTimer = GameState::getOneSecondInFrames(); } else { @@ -245,11 +246,7 @@ void CNpcSubSharkEnemy::processMovement( int _frames ) m_frame = 0; } - if ( m_timerTimer > 0 ) - { - m_timerTimer -= _frames; - } - else + if ( m_movementTimer <= 0 ) { s32 minX, maxX, minY, maxY; @@ -262,6 +259,20 @@ void CNpcSubSharkEnemy::processMovement( int _frames ) m_state = SUB_SHARK_CHARGE; } + if ( m_timerTimer > 0 ) + { + m_timerTimer -= _frames; + } + else + { + DVECTOR bubblePos = Pos; + bubblePos.vx -= 20 + ( getRnd() % 30 ); + bubblePos.vy -= getRnd() % 50; + CFX::Create( CFX::FX_TYPE_BUBBLE_WATER, bubblePos ); + + m_timerTimer = GameState::getOneSecondInFrames() >> 8; + } + break; }