Fix crash on join when SSM is preloaded but doesn't have focus.

This commit is contained in:
Glenn Maynard
2008-05-28 01:21:52 +00:00
parent 29936c8a2d
commit 43daaf5a1f
3 changed files with 7 additions and 1 deletions
+3
View File
@@ -42,6 +42,7 @@ void Screen::Init()
SetFOV( 0 );
m_smSendOnPop = SM_None;
m_bRunning = false;
ActorUtil::LoadAllCommandsFromName( *this, m_sName, "Screen" );
@@ -68,6 +69,7 @@ void Screen::Init()
void Screen::BeginScreen()
{
m_bRunning = true;
m_bFirstUpdate = true;
/* Screens set these when they determine their next screen dynamically. Reset them
@@ -87,6 +89,7 @@ void Screen::BeginScreen()
void Screen::EndScreen()
{
this->PlayCommand( "End" );
m_bRunning = false;
}
void Screen::Update( float fDeltaTime )
+3
View File
@@ -87,6 +87,9 @@ protected:
float m_fLockInputSecs;
/* If currently between BeginScreen/EndScreen calls: */
bool m_bRunning;
public:
RString GetNextScreenName() const;
RString GetPrevScreen() const;
+1 -1
View File
@@ -675,7 +675,7 @@ void ScreenSelectMusic::ChangeDifficulty( PlayerNumber pn, int dir )
void ScreenSelectMusic::HandleMessage( const Message &msg )
{
if( msg == Message_PlayerJoined )
if( m_bRunning && msg == Message_PlayerJoined )
{
// The current steps may no longer be playable. If one player has double steps
// selected, they are no longer playable now that P2 has joined.