This commit is contained in:
Charles 2001-07-06 14:55:58 +00:00
parent a4b3ec5d5f
commit c0038da590
7 changed files with 63 additions and 12 deletions

View file

@ -492,12 +492,18 @@ void CLevel::initThings(int _respawningLevel)
{
CNpcEnemy *enemy;
enemy=CNpcEnemy::Create(ThisActor);
enemy->setupWaypoints( ThisActor );
enemy->postInit();
if ( ThisActor->Speed )
if ( enemy )
{
enemy->setSpeed( ThisActor->Speed );
// if boss is killed and user dies, boss will not initialise and will return NULL
enemy->setupWaypoints( ThisActor );
enemy->postInit();
if ( ThisActor->Speed )
{
enemy->setSpeed( ThisActor->Speed );
}
}
}
break;
@ -563,8 +569,8 @@ void CLevel::initThings(int _respawningLevel)
/*****************************************************************************/
void CLevel::respawnLevel()
{
m_isBossRespawn = false;
m_bossHealth = 0;
//m_isBossRespawn = false;
//m_bossHealth = 0;
CThingManager::killAllThingsForRespawn();
initThings(true);