From 1e71957df5913338aaca360e4d355c62f51d31d0 Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 21 Jun 2001 16:28:49 +0000 Subject: [PATCH] --- source/enemy/nsshark.cpp | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) 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; }