Skip to content

Commit

Permalink
generate scorekeys for old style highscore imports as well
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jun 2, 2017
1 parent 52e5a53 commit 769eee3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/HighScore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,11 +511,14 @@ void HighScoreImpl::LoadFromNode(const XNode *pNode)
int playedcmod = StringToInt(cmod.substr(1, cmod.size()));
float estrate = static_cast<float>(basecmod) / static_cast<float>(playedcmod);
int herp = lround(estrate * 10);
estrate = herp / 10.f;
estrate = static_cast<float>(herp) / 10.f;
fMusicRate = estrate;
}
}

if (ScoreKey == "")
ScoreKey = "S" + BinaryToHex(CryptManager::GetSHA1ForString(dateTime.GetString()));

grade = clamp( grade, Grade_Tier01, Grade_Failed );
}

Expand Down

0 comments on commit 769eee3

Please sign in to comment.