This commit is contained in:
Charles 2001-07-16 14:19:10 +00:00
parent fd5ed94bae
commit 911c868e99
4 changed files with 40 additions and 21 deletions

View File

@ -778,7 +778,7 @@ void CNpcMotherJellyfishEnemy::processShot( int _frames )
{
case NPC_GENERIC_HIT_CHECK_HEALTH:
{
if ( m_health > 0 )
if ( m_health > 5 )
{
m_health -= 5;
@ -790,6 +790,7 @@ void CNpcMotherJellyfishEnemy::processShot( int _frames )
}
else
{
m_health = 0;
m_state = MOTHER_JELLYFISH_BEGIN_CIRCLE;
}

View File

@ -220,13 +220,23 @@ CNpcEnemy *CNpcEnemy::Create(int enemyType)
{
case CNpcEnemy::NPC_MOTHER_JELLYFISH:
case CNpcEnemy::NPC_SUB_SHARK:
case CNpcEnemy::NPC_SEA_SNAKE:
case CNpcEnemy::NPC_FLYING_DUTCHMAN:
case CNpcEnemy::NPC_IRON_DOGFISH:
{
if ( CLevel::getIsBossRespawn() )
{
if ( !CLevel::getBossHealth() )
if ( CLevel::getBossHealth() <= 0 )
{
return( NULL );
}
}
}
case CNpcEnemy::NPC_SEA_SNAKE:
{
if ( CLevel::getIsBossRespawn() )
{
if ( CLevel::getBossHealth() < 0 )
{
return( NULL );
}
@ -1191,10 +1201,11 @@ void CNpcEnemy::processShot( int _frames )
{
m_health -= 5;
if ( m_health < 0 )
if ( m_health <= 0 )
{
m_state = NPC_GENERIC_HIT_DEATH_START;
m_isDying = true;
m_health = 0;
}
else
{

View File

@ -680,7 +680,7 @@ void CNpcSubSharkEnemy::processShot( int _frames )
{
m_health -= 5;
if ( m_health < 0 )
if ( m_health <= 0 )
{
m_state = NPC_GENERIC_HIT_DEATH_START;
m_isDying = true;

View File

@ -187,7 +187,7 @@ void CNpcSeaSnakeEnemy::shutdown()
}
else
{
CLevel::setBossHealth( 0 );
CLevel::setBossHealth( -1 );
}
// delete snake segments
@ -1057,24 +1057,31 @@ void CNpcSeaSnakeEnemy::processShot( int _frames )
{
if ( !m_segmentCount )
{
m_drawRotation += 64 * _frames;
m_drawRotation &= 4095;
Pos.vy += m_speed * _frames;
if ( m_speed < 5 )
if ( m_collTimer <= 0 )
{
m_speed++;
m_drawRotation += 64 * _frames;
m_drawRotation &= 4095;
Pos.vy += m_speed * _frames;
if ( m_speed < 5 )
{
m_speed++;
}
m_state = NPC_GENERIC_HIT_DEATH_END;
DVECTOR offset = CLevel::getCameraPos();
if ( Pos.vy - offset.vy > VidGetScrH() )
{
setToShutdown();
CGameScene::setBossHasBeenKilled();
}
}
m_state = NPC_GENERIC_HIT_DEATH_END;
DVECTOR offset = CLevel::getCameraPos();
if ( Pos.vy - offset.vy > VidGetScrH() )
else
{
setToShutdown();
CGameScene::setBossHasBeenKilled();
m_controlFunc = NPC_CONTROL_MOVEMENT;
}
}
else