From 074812d151ab30508c1dbd9f47fb02f380b871d1 Mon Sep 17 00:00:00 2001 From: MinaciousGrace Date: Sun, 28 May 2017 09:38:02 -0400 Subject: [PATCH] turns out the first score is the personal best, not the last, derp --- src/ScoreManager.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ScoreManager.cpp b/src/ScoreManager.cpp index 3b61a3826b..2976757cf5 100644 --- a/src/ScoreManager.cpp +++ b/src/ScoreManager.cpp @@ -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); @@ -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) {