From 769eee3763ed93226d7e5b652c8a90ea8872115c Mon Sep 17 00:00:00 2001 From: MinaciousGrace Date: Thu, 1 Jun 2017 23:49:39 -0400 Subject: [PATCH] generate scorekeys for old style highscore imports as well --- src/HighScore.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/HighScore.cpp b/src/HighScore.cpp index 18654ce0f1..6499b76607 100644 --- a/src/HighScore.cpp +++ b/src/HighScore.cpp @@ -511,11 +511,14 @@ void HighScoreImpl::LoadFromNode(const XNode *pNode) int playedcmod = StringToInt(cmod.substr(1, cmod.size())); float estrate = static_cast(basecmod) / static_cast(playedcmod); int herp = lround(estrate * 10); - estrate = herp / 10.f; + estrate = static_cast(herp) / 10.f; fMusicRate = estrate; } } + if (ScoreKey == "") + ScoreKey = "S" + BinaryToHex(CryptManager::GetSHA1ForString(dateTime.GetString())); + grade = clamp( grade, Grade_Tier01, Grade_Failed ); }