This commit is contained in:
Charles 2001-05-04 21:58:41 +00:00
parent 17723f2894
commit b81f49a1cd
4 changed files with 35 additions and 0 deletions

View File

@ -45,6 +45,11 @@ void CNpcMotherJellyfishEnemy::postInit()
{
m_state = MOTHER_JELLYFISH_RETURN_TO_START_1;
m_spawnTimer = 0;
if ( CLevel::getIsBossRespawn() )
{
m_health = CLevel::getBossHealth();
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -242,6 +247,19 @@ void CNpcMotherJellyfishEnemy::processClose( int _frames )
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcMotherJellyfishEnemy::shutdown()
{
if ( m_isActive )
{
CLevel::setIsBossRespawn( true );
CLevel::setBossHealth( m_health );
}
CNpcEnemy::shutdown();
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcMotherJellyfishEnemy::spawnJellyfish( int _frames )
{
if ( m_jellyfishCount )

View File

@ -19,6 +19,7 @@ class CNpcMotherJellyfishEnemy : public CNpcEnemy
public:
virtual void postInit();
void render();
virtual void shutdown();
protected:
virtual void processClose( int _frames );
virtual void processMovement( int _frames );

View File

@ -128,6 +128,8 @@ const FileEquate loadingScreens[6]=
DVECTOR CLevel::MapPos;
DVECTOR CLevel::s_playerSpawnPos;
u8 CLevel::m_isBossRespawn;
s32 CLevel::m_bossHealth;
/*****************************************************************************/
CLevel::CLevel()
{
@ -178,6 +180,9 @@ sLvlTab *lvlTab=&LvlTable[LevelNo];
MapPos.vx=MapPos.vy=0;
initLayers();
m_isBossRespawn = false;
m_bossHealth = 0;
}
/*****************************************************************************/
@ -486,6 +491,9 @@ void CLevel::initThings(int _respawningLevel)
/*****************************************************************************/
void CLevel::respawnLevel()
{
m_isBossRespawn = false;
m_bossHealth = 0;
CThingManager::killAllThingsForRespawn();
initThings(true);
}

View File

@ -52,6 +52,11 @@ public:
void respawnLevel();
static u8 getIsBossRespawn() {return m_isBossRespawn;}
static s32 getBossHealth() {return m_bossHealth;}
static void setIsBossRespawn( u8 newIsBossRespawn ) {m_isBossRespawn=newIsBossRespawn;}
static void setBossHealth( s32 newBossHealth ) {m_bossHealth=newBossHealth;}
private:
void initLayers();
@ -86,6 +91,9 @@ private:
int HazardCount;
sThingHazard **HazardList;
static u8 m_isBossRespawn;
static s32 m_bossHealth;
};
/*****************************************************************************/