Skip to content

Commit

Permalink
wife3 should use proper totalpoint values from steps as input
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed May 7, 2020
1 parent 3d20d92 commit d6628b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
13 changes: 1 addition & 12 deletions src/Etterna/Models/Misc/HighScore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1379,7 +1379,7 @@ HighScore::RescoreToWife2Judge(int x)
}

bool
HighScore::RescoreToWife3()
HighScore::RescoreToWife3(float pmax)
{
if (GetWifeVersion() == 3)
return false;
Expand Down Expand Up @@ -1407,12 +1407,6 @@ HighScore::RescoreToWife3()
wife3_hold_drop_weight;
p += m_Impl->iTapNoteScores[TNS_HitMine] * wife3_mine_hit_weight;

float pmax = static_cast<float>(m_Impl->vOffsetVector.size() * 2);
if (m_Impl->ReplayType == 2) {
pmax += m_Impl->iTapNoteScores[TNS_HitMine] * -2.f;
p += m_Impl->iTapNoteScores[TNS_HitMine] * -2.f;
}

m_Impl->fSSRNormPercent = p / pmax;

// ok so this is kind of lazy but we do actually want to rescore the wifescore
Expand All @@ -1426,11 +1420,6 @@ HighScore::RescoreToWife3()
wife3_hold_drop_weight;
p += m_Impl->iTapNoteScores[TNS_HitMine] * wife3_mine_hit_weight;

pmax = static_cast<float>(m_Impl->vOffsetVector.size() * 2);
if (m_Impl->ReplayType == 2) {
pmax += m_Impl->iTapNoteScores[TNS_HitMine] * -2.f;
p += m_Impl->iTapNoteScores[TNS_HitMine] * -2.f;
}
m_Impl->fWifeScore = p / pmax;
m_Impl->WifeVersion = 3;
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/Etterna/Models/Misc/HighScore.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ struct HighScore
// Mina stuff - Mina
float RescoreToWife2Judge(int x);
// update wifescore (judge the score was achieved on) and ssrnorm
bool RescoreToWife3();
bool RescoreToWife3(float pmax);
float RescoreToDPJudge(int x);
float GetSkillsetSSR(Skillset ss) const;
int GetWifeVersion() const;
Expand Down

0 comments on commit d6628b5

Please sign in to comment.