From 4cefba60e77c1844a6ea97d19101d2facba176ec Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 4 Jul 2001 20:00:05 +0000 Subject: [PATCH] --- source/enemy/ndogfish.cpp | 36 ++++++++++++++++++++++-------------- source/enemy/ndogfish.h | 4 ++-- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/source/enemy/ndogfish.cpp b/source/enemy/ndogfish.cpp index 998928c77..460d4e9a4 100644 --- a/source/enemy/ndogfish.cpp +++ b/source/enemy/ndogfish.cpp @@ -252,15 +252,24 @@ void CNpcIronDogfishEnemy::processStandardIronDogfishAttack( int _frames ) s16 headingToPlayer = ratan2( playerYDist, playerXDist ) & 4095; - /*CProjectile *projectile; + CProjectile *projectile; projectile = CProjectile::Create(); DVECTOR startPos = Pos; - startPos.vy -= 20; - projectile->init( startPos, headingToPlayer );*/ + if ( m_heading == 0 ) + { + startPos.vx += 60; + } + else + { + startPos.vx -= 60; + } + startPos.vy -= 45; - m_laserTimer = GameState::getOneSecondInFrames(); + projectile->init( startPos, headingToPlayer ); - m_effect = (CFXLaser*) CFX::Create( CFX::FX_TYPE_LASER, this ); + m_laserTimer = GameState::getOneSecondInFrames() >> 1; + + /*m_effect = (CFXLaser*) CFX::Create( CFX::FX_TYPE_LASER, this ); DVECTOR offsetPos; if ( m_heading == 0 ) @@ -278,7 +287,7 @@ void CNpcIronDogfishEnemy::processStandardIronDogfishAttack( int _frames ) targetPos.vy -= 45; m_effect->setTarget( targetPos ); - m_effect->setRGB( 255, 0, 0 ); + m_effect->setRGB( 255, 0, 0 );*/ m_state++; @@ -301,18 +310,14 @@ void CNpcIronDogfishEnemy::processStandardIronDogfishAttack( int _frames ) } else { - m_effect->killFX(); + //m_effect->killFX(); m_state++; - if ( m_state > IRON_DOGFISH_LASER_EYE_2_WAIT ) + if ( m_state == IRON_DOGFISH_LASER_EYE_2_WAIT ) { - // return to first state - - m_state = IRON_DOGFISH_THUMP_1; + m_movementTimer = GameState::getOneSecondInFrames() * 3; } - - m_movementTimer = GameState::getOneSecondInFrames() * 3; } break; @@ -362,7 +367,10 @@ void CNpcIronDogfishEnemy::processStandardIronDogfishAttack( int _frames ) else if ( !m_animPlaying ) { m_movementTimer = GameState::getOneSecondInFrames() * 3; - m_state++; + + // return to first state + + m_state = IRON_DOGFISH_THUMP_1; } } diff --git a/source/enemy/ndogfish.h b/source/enemy/ndogfish.h index e14e17931..6b1caf39a 100644 --- a/source/enemy/ndogfish.h +++ b/source/enemy/ndogfish.h @@ -46,10 +46,10 @@ protected: IRON_DOGFISH_THUMP_1 = 0, IRON_DOGFISH_LASER_EYE_1 = 1, IRON_DOGFISH_LASER_EYE_1_WAIT, - IRON_DOGFISH_THUMP_2, - IRON_DOGFISH_ROLL, IRON_DOGFISH_LASER_EYE_2, IRON_DOGFISH_LASER_EYE_2_WAIT, + IRON_DOGFISH_THUMP_2, + IRON_DOGFISH_ROLL, }; s32 m_steamTimer;