Skip to content

Commit 769eee3

Browse files
generate scorekeys for old style highscore imports as well
1 parent 52e5a53 commit 769eee3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/HighScore.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,11 +511,14 @@ void HighScoreImpl::LoadFromNode(const XNode *pNode)
511511
int playedcmod = StringToInt(cmod.substr(1, cmod.size()));
512512
float estrate = static_cast<float>(basecmod) / static_cast<float>(playedcmod);
513513
int herp = lround(estrate * 10);
514-
estrate = herp / 10.f;
514+
estrate = static_cast<float>(herp) / 10.f;
515515
fMusicRate = estrate;
516516
}
517517
}
518518

519+
if (ScoreKey == "")
520+
ScoreKey = "S" + BinaryToHex(CryptManager::GetSHA1ForString(dateTime.GetString()));
521+
519522
grade = clamp( grade, Grade_Tier01, Grade_Failed );
520523
}
521524

0 commit comments

Comments
 (0)