This commit is contained in:
Daveo 2001-05-10 23:20:45 +00:00
parent 4cc282d31c
commit 367143790d
2 changed files with 10 additions and 0 deletions

View File

@ -134,6 +134,7 @@ CGameScene::ACTOR_TYPE CGameScene::actorType[40] =
int s_globalLevelSelectThing=0; int s_globalLevelSelectThing=0;
int CGameScene::s_readyToExit; int CGameScene::s_readyToExit;
int CGameScene::s_levelFinished; int CGameScene::s_levelFinished;
int CGameScene::s_restartLevel;
/*****************************************************************************/ /*****************************************************************************/
@ -170,6 +171,7 @@ void CGameScene::init()
m_pauseMenu->init(); m_pauseMenu->init();
s_readyToExit=false; s_readyToExit=false;
s_restartLevel=false;
CFader::setFadingIn(); CFader::setFadingIn();
initLevel(); initLevel();
@ -241,6 +243,11 @@ void CGameScene::think(int _frames)
initLevel(); initLevel();
s_levelFinished=false; s_levelFinished=false;
} }
else if (s_restartLevel)
{
respawnLevel();
s_restartLevel=false;
}
if(!m_pauseMenu->isActive()&&PadGetDown(0)&PAD_START&&canPause()) if(!m_pauseMenu->isActive()&&PadGetDown(0)&PAD_START&&canPause())
@ -284,6 +291,7 @@ CPlayer * CGameScene::getPlayer()
/*****************************************************************************/ /*****************************************************************************/
void CGameScene::respawnLevel() void CGameScene::respawnLevel()
{ {
m_player->respawn();
Level.respawnLevel(); Level.respawnLevel();
} }

View File

@ -45,6 +45,7 @@ virtual int canPause();
static void setReadyToExit() {s_readyToExit=true;} static void setReadyToExit() {s_readyToExit=true;}
static void levelFinished() {s_levelFinished=true;} static void levelFinished() {s_levelFinished=true;}
static void restartlevel() {s_restartLevel=true;}
// static MATRIX &GetCamMtx() {return(CamMtx);} // static MATRIX &GetCamMtx() {return(CamMtx);}
static ACTOR_TYPE getActorType( int actorNum ) {return actorType[actorNum];} static ACTOR_TYPE getActorType( int actorNum ) {return actorType[actorNum];}
@ -62,6 +63,7 @@ class CPlayer *m_player;
static FontBank *s_genericFont; static FontBank *s_genericFont;
static MATRIX CamMtx; static MATRIX CamMtx;
static int s_restartLevel;
static int s_readyToExit; static int s_readyToExit;
static int s_levelFinished; static int s_levelFinished;