Skip to content

Commit

Permalink
maybe check the intended rate of the scoregoal before handing out ach…
Browse files Browse the repository at this point in the history
…ievement status
  • Loading branch information
MinaciousGrace committed Apr 30, 2017
1 parent af7eee3 commit 176b6f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2470,7 +2470,8 @@ void Profile::SetAnyAchievedGoals(RString ck, float rate, const HighScore& pscor
auto& sgv = goalmap[ck];
for (size_t i = 0; i < sgv.size(); ++i) {
ScoreGoal& tmp = sgv[i];
if (tmp.percent < pscore.GetWifeScore() * 100.f) { // should probably adhere to the established process of storing scores percents as 0.xx to avoid this kind of confusion -mina
// should probably adhere to the established process of storing scores percents as 0.xx to avoid this kind of confusion -mina
if (lround(tmp.rate * 1000.f) == lround(rate * 1000.f) && tmp.percent < pscore.GetWifeScore() * 100.f) {
tmp.achieved = true;
tmp.timeachieved = pscore.GetDateTime();
}
Expand Down

0 comments on commit 176b6f7

Please sign in to comment.