Skip to content

Commit

Permalink
don't re-achieve already achieved goals
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Apr 30, 2017
1 parent fe50843 commit 74c2051
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2471,7 +2471,7 @@ void Profile::SetAnyAchievedGoals(RString ck, float rate, const HighScore& pscor
for (size_t i = 0; i < sgv.size(); ++i) {
ScoreGoal& tmp = sgv[i];
// 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) {
if (lround(tmp.rate * 1000.f) == lround(rate * 1000.f) && !tmp.achieved &&tmp.percent < pscore.GetWifeScore() * 100.f) {
tmp.achieved = true;
tmp.timeachieved = pscore.GetDateTime();
}
Expand Down

0 comments on commit 74c2051

Please sign in to comment.