Skip to content

Commit

Permalink
add gettopscore to highscores and DONT read the existing value
Browse files Browse the repository at this point in the history
topscores should always be recalculated by the client and never read in
  • Loading branch information
MinaciousGrace committed Nov 4, 2017
1 parent c7cc786 commit f2216ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/HighScore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,6 @@ void HighScoreImpl::LoadFromEttNode(const XNode *pNode) {
pNode->GetChildValue("Modifiers", s); sModifiers = s;
pNode->GetChildValue("DateTime", s); dateTime.FromString(s);
pNode->GetChildValue("ScoreKey", s); ScoreKey = s;
pNode->GetChildValue("TopScore", TopScore);

const XNode* pTapNoteScores = pNode->GetChild("TapNoteScores");
if (pTapNoteScores)
Expand Down Expand Up @@ -727,6 +726,7 @@ float HighScore::GetSkillsetSSR(Skillset ss) const { return m_Impl->fSkillsetSSR
const RadarValues &HighScore::GetRadarValues() const { return m_Impl->radarValues; }
float HighScore::GetLifeRemainingSeconds() const { return m_Impl->fLifeRemainingSeconds; }
bool HighScore::GetDisqualified() const { return m_Impl->bDisqualified; }
int HighScore::GetTopScore() const { return m_Impl->TopScore; }

void HighScore::SetName( const string &sName ) { m_Impl->sName = sName; }
void HighScore::SetChartKey( const string &ck) { m_Impl->ChartKey = ck; }
Expand Down
1 change: 1 addition & 0 deletions src/HighScore.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ struct HighScore
vector<float> GetOffsetVector() const;
vector<int> GetNoteRowVector() const;
string GetScoreKey() const;
int GetTopScore() const;
/**
* @brief Determine how many seconds the player had left in Survival mode.
* @return the number of seconds left. */
Expand Down

0 comments on commit f2216ac

Please sign in to comment.