Skip to content

Commit

Permalink
Fix offline gameplayscreen while connected to smo
Browse files Browse the repository at this point in the history
  • Loading branch information
nico-abram committed Jun 24, 2018
1 parent 3962e55 commit 72f2c74
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/GameState.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ class GameState
bool m_bDemonstrationOrJukebox;
bool m_bJukeboxUsesModifiers;
int m_iNumStagesOfThisSong;
//Used by GameplayScreen to know if it needs to call NSMAN
bool m_bInNetGameplay = false;
/**
* @brief Increase this every stage while not resetting on a continue.
*
Expand Down
2 changes: 1 addition & 1 deletion src/ScreenGameplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ ScreenGameplay::ScreenGameplay()
{
m_pSongBackground = NULL;
m_pSongForeground = NULL;
m_bForceNoNetwork = false;
m_bForceNoNetwork = !GAMESTATE->m_bInNetGameplay;
m_delaying_ready_announce= false;
GAMESTATE->m_AdjustTokensBySongCostForFinalStageCheck= false;
#if !defined(WITHOUT_NETWORKING)
Expand Down
1 change: 1 addition & 0 deletions src/ScreenNetSelectMusic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ void ScreenNetSelectMusic::HandleScreenMessage( const ScreenMessage SM )
}
else if( SM == SM_GoToNextScreen )
{
GAMESTATE->m_bInNetGameplay = true;
SOUND->StopMusic();
SCREENMAN->SetNewScreen( THEME->GetMetric (m_sName, "NextScreen") );
}
Expand Down
2 changes: 1 addition & 1 deletion src/ScreenSelectMusic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ void ScreenSelectMusic::HandleScreenMessage(const ScreenMessage SM)
m_bAllowOptionsMenu = false;
if (OPTIONS_MENU_AVAILABLE && !m_bGoToOptions)
this->PlayCommand("HidePressStartForOptions");

GAMESTATE->m_bInNetGameplay = false;
this->PostScreenMessage(SM_GoToNextScreen, this->GetTweenTimeLeft());
}
else if (SM == SM_GoToNextScreen)
Expand Down

0 comments on commit 72f2c74

Please sign in to comment.