Skip to content

Commit

Permalink
cleanup more playlist related logic in screen gameplay, and don't att…
Browse files Browse the repository at this point in the history
…ach scores to a course if the course doesn't get completed
  • Loading branch information
MinaciousGrace committed Jun 13, 2017
1 parent 96947c5 commit a1ac458
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/AdjustSync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void AdjustSync::ResetAutosync()
bool AdjustSync::IsSyncDataChanged()
{
// Can't sync in course mode :joy_cat: -mina
if(!GAMESTATE->IsPlaylistCourse())
if(GAMESTATE->IsPlaylistCourse())
return false;

vector<RString> vs;
Expand Down Expand Up @@ -169,7 +169,7 @@ void AdjustSync::HandleAutosync( float fNoteOffBySeconds, float fStepTime )

void AdjustSync::HandleSongEnd()
{
if (!GAMESTATE->IsPlaylistCourse())
if (GAMESTATE->IsPlaylistCourse())
return;

if( GAMESTATE->m_SongOptions.GetCurrent().m_AutosyncType == AutosyncType_Tempo )
Expand Down
7 changes: 3 additions & 4 deletions src/ScreenGameplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ void ScreenGameplay::InitSongQueues()
const PlayerOptions &p = pi->GetPlayerState()->m_PlayerOptions.GetCurrent();
}

if (SONGMAN->playlistcourse != "") {
if (GAMESTATE->IsPlaylistCourse()) {

m_apSongsQueue.clear();
FOREACH_EnabledPlayerInfo(m_vPlayerInfo, pi)
Expand Down Expand Up @@ -1818,7 +1818,6 @@ void ScreenGameplay::BeginBackingOutFromGameplay()
m_GameplayAssist.StopPlaying(); // Stop any queued assist ticks.

if (GAMESTATE->IsPlaylistCourse()) {
SONGMAN->allplaylists[SONGMAN->playlistcourse].courseruns.emplace_back(playlistscorekeys);
GAMESTATE->isplaylistcourse = false;
SONGMAN->playlistcourse = "";
}
Expand Down Expand Up @@ -2347,7 +2346,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )

m_sNextScreen = GetPrevScreen();

if( AdjustSync::IsSyncDataChanged() && GAMESTATE->IsPlaylistCourse())
if(!GAMESTATE->IsPlaylistCourse() && AdjustSync::IsSyncDataChanged())
ScreenSaveSync::PromptSaveSync( SM_GoToPrevScreen );
else
HandleScreenMessage( SM_GoToPrevScreen );
Expand All @@ -2360,7 +2359,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
if( GAMESTATE->m_SongOptions.GetCurrent().m_bSaveReplay )
SaveReplay();

if( AdjustSync::IsSyncDataChanged() && GAMESTATE->IsPlaylistCourse())
if(!GAMESTATE->IsPlaylistCourse() && AdjustSync::IsSyncDataChanged())
ScreenSaveSync::PromptSaveSync( SM_GoToNextScreen );
else
HandleScreenMessage( SM_GoToNextScreen );
Expand Down

0 comments on commit a1ac458

Please sign in to comment.