diff --git a/src/Profile.cpp b/src/Profile.cpp index 38c793b0f1..1d766a89e2 100644 --- a/src/Profile.cpp +++ b/src/Profile.cpp @@ -1981,7 +1981,7 @@ void Profile::ImportScoresToEtterna() { HighScore hs = hsv[i]; // ignore historic key and just load from here since the hashing function was changed anyway hs.SetChartKey(ck); - SCOREMAN->AddScore(hs); + SCOREMAN->ImportScore(hs); ++loaded; } continue; @@ -2055,7 +2055,7 @@ void Profile::ImportScoresToEtterna() { if (matched) { ck = steps->GetChartKey(); loaded++; - SCOREMAN->AddScore(tmp); + SCOREMAN->ImportScore(tmp); } } } diff --git a/src/ScoreManager.cpp b/src/ScoreManager.cpp index 806fd4ecaa..1303c67997 100644 --- a/src/ScoreManager.cpp +++ b/src/ScoreManager.cpp @@ -264,6 +264,17 @@ HighScore* ScoreManager::GetTopSSRHighScore(unsigned int rank, int ss) { return NULL; } +void ScoreManager::ImportScore(const HighScore& hs_) { + HighScore hs = hs_; + + // don't import duplicated scores + // this may have strange ramifications - mina + // actually i'll just disable this for the time being and give myself time to test it later + //if(!ScoresByKey.count(hs.GetScoreKey())) + + pscores[hs.GetChartKey()].AddScore(hs); +} + diff --git a/src/ScoreManager.h b/src/ScoreManager.h index 0fa940459c..0b81c53101 100644 --- a/src/ScoreManager.h +++ b/src/ScoreManager.h @@ -95,6 +95,7 @@ class ScoreManager // for scores achieved during this session void AddScore(const HighScore& hs_) { HighScore hs = hs_; pscores[hs.GetChartKey()].AddScore(hs); } + void ImportScore(const HighScore& hs_); // don't save scores under this percentage float minpercent = PREFSMAN->m_fMinPercentToSaveScores;