Fix crash on join when SSM is preloaded but doesn't have focus.
This commit is contained in:
@@ -42,6 +42,7 @@ void Screen::Init()
|
|||||||
SetFOV( 0 );
|
SetFOV( 0 );
|
||||||
|
|
||||||
m_smSendOnPop = SM_None;
|
m_smSendOnPop = SM_None;
|
||||||
|
m_bRunning = false;
|
||||||
|
|
||||||
ActorUtil::LoadAllCommandsFromName( *this, m_sName, "Screen" );
|
ActorUtil::LoadAllCommandsFromName( *this, m_sName, "Screen" );
|
||||||
|
|
||||||
@@ -68,6 +69,7 @@ void Screen::Init()
|
|||||||
|
|
||||||
void Screen::BeginScreen()
|
void Screen::BeginScreen()
|
||||||
{
|
{
|
||||||
|
m_bRunning = true;
|
||||||
m_bFirstUpdate = true;
|
m_bFirstUpdate = true;
|
||||||
|
|
||||||
/* Screens set these when they determine their next screen dynamically. Reset them
|
/* Screens set these when they determine their next screen dynamically. Reset them
|
||||||
@@ -87,6 +89,7 @@ void Screen::BeginScreen()
|
|||||||
void Screen::EndScreen()
|
void Screen::EndScreen()
|
||||||
{
|
{
|
||||||
this->PlayCommand( "End" );
|
this->PlayCommand( "End" );
|
||||||
|
m_bRunning = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Screen::Update( float fDeltaTime )
|
void Screen::Update( float fDeltaTime )
|
||||||
|
|||||||
@@ -87,6 +87,9 @@ protected:
|
|||||||
|
|
||||||
float m_fLockInputSecs;
|
float m_fLockInputSecs;
|
||||||
|
|
||||||
|
/* If currently between BeginScreen/EndScreen calls: */
|
||||||
|
bool m_bRunning;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RString GetNextScreenName() const;
|
RString GetNextScreenName() const;
|
||||||
RString GetPrevScreen() const;
|
RString GetPrevScreen() const;
|
||||||
|
|||||||
@@ -675,7 +675,7 @@ void ScreenSelectMusic::ChangeDifficulty( PlayerNumber pn, int dir )
|
|||||||
|
|
||||||
void ScreenSelectMusic::HandleMessage( const Message &msg )
|
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
|
// 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.
|
// selected, they are no longer playable now that P2 has joined.
|
||||||
|
|||||||
Reference in New Issue
Block a user