Skip to content

Commit

Permalink
possibly fix non-pbs for rates uploading pbs on site when uploaded
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed May 18, 2020
1 parent 3b4c93a commit e9c4e12
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Etterna/Models/Misc/StageStats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,20 @@ StageStats::FinalizeScores(bool bSummary)
DLMAN->UploadScoreWithReplayData(&hs);
hs.timeStamps.clear();
hs.timeStamps.shrink_to_fit();

// mega hack to stop non-pbs from overwriting pbs on eo (it happens rate
// specific), we're just going to also upload whatever the pb for the
// rate is now, since the site only tracks the best score per rate.
// If there's no more replaydata on disk for the old pb this could maybe
// be a problem and perhaps the better solution would be to check what
// is listed on the site for this rate before uploading the score just
// achieved but idk someone else can look into that

// this _should_ be sound since addscore handles all re-evaluation of
// top score flags and the setting of pbptrs
DLMAN->UploadScoreWithReplayDataFromDisk(SCOREMAN->GetChartPBAt(
pSteps->GetChartKey(),
GAMESTATE->m_SongOptions.GetCurrent().m_fMusicRate));
}
if (NSMAN->loggedIn)
NSMAN->ReportHighScore(&hs, m_player);
Expand Down

0 comments on commit e9c4e12

Please sign in to comment.