Skip to content

Commit

Permalink
remove old old bandaid for when i super messed up normpercents
Browse files Browse the repository at this point in the history
if removing this causes a problem, then we should probably know that and fix it properly instead of whatever this was
  • Loading branch information
MinaciousGrace committed May 7, 2020
1 parent 63c5798 commit 984bd63
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 41 deletions.
42 changes: 3 additions & 39 deletions src/Etterna/Models/Misc/HighScore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1226,16 +1226,8 @@ void
HighScore::LoadFromEttNode(const XNode* pNode)
{
m_Impl->LoadFromEttNode(pNode);

if (m_Impl->fSSRNormPercent > 1000.f) {
if (m_Impl->grade != Grade_Failed)
m_Impl->fSSRNormPercent = RescoreToWifeJudgeDuringLoad(4);
else
m_Impl->fSSRNormPercent = m_Impl->fWifeScore;

m_Impl->vNoteRowVector.clear();
m_Impl->vOffsetVector.clear();
}
m_Impl->vNoteRowVector.clear();
m_Impl->vOffsetVector.clear();
}

const std::string&
Expand Down Expand Up @@ -1442,35 +1434,7 @@ HighScore::RescoreToWife3()
return true;
}


float
HighScore::RescoreToWifeJudgeDuringLoad(int x)
{
if (!LoadReplayData())
return m_Impl->fWifeScore;

const float tso[] = { 1.50f, 1.33f, 1.16f, 1.00f, 0.84f,
0.66f, 0.50f, 0.33f, 0.20f };
float ts = tso[x - 1];
float p = 0;
for (auto& n : m_Impl->vOffsetVector)
p += wife2(n, ts);

p += (m_Impl->iHoldNoteScores[HNS_LetGo] +
m_Impl->iHoldNoteScores[HNS_Missed]) *
-6.f;
p += m_Impl->iTapNoteScores[TNS_HitMine] * -8.f;

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;
}

float o = p / pmax;
return o;
}

// DONT REALLY KNOW WHY THIS IS STILL HERE
float
HighScore::RescoreToDPJudge(int x)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Etterna/Models/Misc/HighScore.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ struct HighScore

// Mina stuff - Mina
float RescoreToWife2Judge(int x);
bool RescoreToWife3(); // will update both wifescore (matching the judge the score was achieved on) and ssrnorm
float RescoreToWifeJudgeDuringLoad(int x); // uuugh -mina
// update wifescore (judge the score was achieved on) and ssrnorm
bool RescoreToWife3();
float RescoreToDPJudge(int x);
float GetSkillsetSSR(Skillset ss) const;
int GetWifeVersion() const;
Expand Down

0 comments on commit 984bd63

Please sign in to comment.