Skip to content

Commit

Permalink
turns out the first score is the personal best, not the last, derp
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed May 28, 2017
1 parent 612d5ff commit 074812d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ScoreManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ void ScoresAtRate::LoadFromNode(const XNode* node, const string& ck, const float
p->GetAttrValue("Key", sk);
scores[sk].LoadFromEttNode(p);

// Set first score as the pbptr
if(PBptr == nullptr)
PBptr = &scores.find(sk)->second;

// Fill in stuff for the highscores
scores[sk].SetChartKey(ck);
scores[sk].SetScoreKey(sk);
Expand All @@ -330,9 +334,6 @@ void ScoresAtRate::LoadFromNode(const XNode* node, const string& ck, const float
SCOREMAN->RegisterScore(&scores.find(sk)->second);
SCOREMAN->AddToKeyedIndex(&scores.find(sk)->second);
}

// Set the pbptr
PBptr = &scores.find(sk)->second;
}

void ScoresForChart::LoadFromNode(const XNode* node, const string& ck) {
Expand Down

0 comments on commit 074812d

Please sign in to comment.