From 1fa8e3f85b3a1a620703a199bbb3662d716c1e23 Mon Sep 17 00:00:00 2001 From: MinaciousGrace Date: Tue, 30 May 2017 01:26:07 -0400 Subject: [PATCH] call recalculatessr after gameplay again... because calling it during song load hopelessly breaks some scores --- src/Profile.cpp | 6 ++---- src/StatsManager.cpp | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Profile.cpp b/src/Profile.cpp index bf1d9efca1..1b9b53f3d9 100644 --- a/src/Profile.cpp +++ b/src/Profile.cpp @@ -827,7 +827,7 @@ ProfileLoadResult Profile::LoadAllFromDir( const RString &sDir, bool bRequireSig ImportScoresToEtterna(); } - LoadOldEttFromDir(sDir); + //LoadOldEttFromDir(sDir); CalculateStatsFromScores(); return ProfileLoadResult_Success; @@ -1049,6 +1049,7 @@ ProfileLoadResult Profile::LoadEttXmlFromNode(const XNode *xml) { } void Profile::CalculateStatsFromScores() { + LOG->Trace("Calculating stats from scores"); vector all = SCOREMAN->GetAllScores(); float TotalGameplaySeconds = 0.f; m_iTotalTapsAndHolds = 0; @@ -1071,9 +1072,6 @@ void Profile::CalculateStatsFromScores() { m_iTotalDancePoints = m_iTotalTapsAndHolds * 2; m_iTotalGameplaySeconds = static_cast(TotalGameplaySeconds); - // for some reason this is a lot slower than it should be when called here...? -mina - SCOREMAN->RecalculateSSRs(); - SCOREMAN->CalcPlayerRating(m_fPlayerRating, m_fPlayerSkillsets); } diff --git a/src/StatsManager.cpp b/src/StatsManager.cpp index e8615a4468..fad7d37b91 100644 --- a/src/StatsManager.cpp +++ b/src/StatsManager.cpp @@ -103,11 +103,11 @@ void StatsManager::CalcAccumPlayedStageStats() m_AccumPlayedStageStats = AccumPlayedStageStats( m_vPlayedStageStats ); } -// almost deadcode -mina +// fffff this is back here because some scores/files dont calc properly if called during load -mina void AddPlayerStatsToProfile( Profile *pProfile, const StageStats &ss, PlayerNumber pn ) { + SCOREMAN->RecalculateSSRs(); SCOREMAN->CalcPlayerRating(pProfile->m_fPlayerRating, pProfile->m_fPlayerSkillsets); - return; } void StatsManager::CommitStatsToProfiles( const StageStats *pSS )