diff --git a/source/frontend/demomode.h b/source/frontend/demomode.h index d304775e6..a4f044144 100644 --- a/source/frontend/demomode.h +++ b/source/frontend/demomode.h @@ -41,7 +41,8 @@ class CDemoGameScene : public CGameScene { public: - void createPlayer(); + virtual void createPlayer(); + virtual int canPause() {return false;} }; diff --git a/source/game/game.cpp b/source/game/game.cpp index 926da2875..ef4e956bf 100644 --- a/source/game/game.cpp +++ b/source/game/game.cpp @@ -123,6 +123,12 @@ void CGameScene::createPlayer() m_player=new ("player") CPlayer(); } +// This is also to be overloaded for demomode.. to stop the pause menu appearing +int CGameScene::canPause() +{ + return true; +} + /*****************************************************************************/ @@ -159,7 +165,8 @@ void CGameScene::think(int _frames) // } //#endif - if(!m_pauseMenu->isActive()&&PadGetDown(0)&PAD_START) + + if(!m_pauseMenu->isActive()&&PadGetDown(0)&PAD_START&&canPause()) { m_pauseMenu->select(); } diff --git a/source/game/game.h b/source/game/game.h index f00449f53..01e953240 100644 --- a/source/game/game.h +++ b/source/game/game.h @@ -28,6 +28,7 @@ virtual ~CGameScene() {;} void init(); virtual void createPlayer(); +virtual int canPause(); void shutdown(); void render(); void think(int _frames);