Skip to content

Commit

Permalink
set replaytype to full during fillinhighscore so rescorer works properly
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jul 19, 2018
1 parent 21461f2 commit a94a749
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/HighScore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ HighScoreImpl::HighScoreImpl()
fLifeRemainingSeconds = 0;
string ValidationKey = "";
TopScore = 0;
ReplayType = 0;
ReplayType = 2;
}

XNode *HighScoreImpl::CreateNode() const
Expand Down Expand Up @@ -721,9 +721,10 @@ bool HighScore::LoadReplayDataBasic() {
}

bool HighScore::LoadReplayDataFull() {
// already exists
if (m_Impl->vNoteRowVector.size() > 4 && m_Impl->vOffsetVector.size() > 4)
if (m_Impl->vNoteRowVector.size() > 4 && m_Impl->vOffsetVector.size() > 4) {
m_Impl->ReplayType = 2;
return true;
}

string profiledir;
vector<int> vNoteRowVector;
Expand Down Expand Up @@ -927,6 +928,7 @@ string HighScore::GetValidationKey(ValidationKey vk) const { return m_Impl->Vali
void HighScore::SetRadarValues( const RadarValues &rv ) { m_Impl->radarValues = rv; }
void HighScore::SetLifeRemainingSeconds( float f ) { m_Impl->fLifeRemainingSeconds = f; }
void HighScore::SetDisqualified( bool b ) { m_Impl->bDisqualified = b; }
void HighScore::SetReplayType(int i) { m_Impl->ReplayType = i; }

void HighScore::UnloadReplayData() {
m_Impl->UnloadReplayData();
Expand Down
1 change: 1 addition & 0 deletions src/HighScore.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ struct HighScore
void SetRadarValues( const RadarValues &rv );
void SetLifeRemainingSeconds( float f );
void SetDisqualified( bool b );
void SetReplayType( int i );

string *GetNameMutable();
const string *GetNameMutable() const { return const_cast<string *> (const_cast<HighScore *>(this)->GetNameMutable()); }
Expand Down
1 change: 1 addition & 0 deletions src/StageStats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ static HighScore FillInHighScore(const PlayerStageStats &pss, const PlayerState
hs.SetTrackVector(pss.GetTrackVector());
hs.SetTapNoteTypeVector(pss.GetTapNoteTypeVector());
hs.SetTapNoteSubTypeVector(pss.GetTapNoteSubTypeVector());
hs.SetReplayType(2); // flag this before rescore so it knows we're LEGGIT

if (pss.GetGrade() == Grade_Failed)
hs.SetSSRNormPercent(0.f);
Expand Down

0 comments on commit a94a749

Please sign in to comment.