Skip to content

Commit

Permalink
move profile save to after score upload, so it is done before eval
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jul 13, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 82b67dd commit c62833f
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/Etterna/Models/Misc/StageStats.cpp
Original file line number Diff line number Diff line change
@@ -727,6 +727,10 @@ StageStats::FinalizeScores(bool bSummary)
hs);
mostrecentscorekey = hs.GetScoreKey();
zzz->m_lastSong.FromSong(GAMESTATE->m_pCurSong);
if (m_bLivePlay) {
PROFILEMAN->SaveLocalProfile(
PROFILEMAN->GetProfile(PLAYER_1)->m_sProfileID);
}

CHECKPOINT_M("Finished Finalizing Score");
LOG->Trace("done saving stats and high scores");
7 changes: 2 additions & 5 deletions src/Etterna/Screen/Others/ScreenProfileSave.cpp
Original file line number Diff line number Diff line change
@@ -22,11 +22,8 @@ ScreenProfileSave::Input(const InputEventPlus& input)
void
ScreenProfileSave::Continue()
{
DLMAN->chartLeaderboards.clear(); // clear cached leaderboard scores when
// saving after gameplay -mina
if (!STATSMAN->m_vPlayedStageStats.empty())
if (STATSMAN->m_vPlayedStageStats.back().m_bLivePlay)
GAMESTATE->SavePlayerProfiles();
// clear cached leaderboard scores after gameplay
DLMAN->chartLeaderboards.clear();

SCREENMAN->ZeroNextUpdate();

0 comments on commit c62833f

Please sign in to comment.