Skip to content

Commit

Permalink
point all getcalcversion calls to getcalcversion_old
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed May 7, 2020
1 parent bd427a0 commit 2a6684f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/Etterna/Models/Misc/StageStats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "Etterna/Singletons/ScoreManager.h"
#include "Etterna/Singletons/DownloadManager.h"
#include "Etterna/Globals/MinaCalc.h"
#include "Etterna/Globals/MinaCalcOld.h"
#include "Etterna/Models/Songs/Song.h"
#include "GamePreferences.h"

Expand Down Expand Up @@ -603,7 +604,7 @@ FillInHighScore(const PlayerStageStats& pss,
FOREACH_ENUM(Skillset, ss)
hs.SetSkillsetSSR(ss, dakine[ss]);

hs.SetSSRCalcVersion(GetCalcVersion());
hs.SetSSRCalcVersion(GetCalcVersion_OLD());
} else {
FOREACH_ENUM(Skillset, ss)
hs.SetSkillsetSSR(ss, 0.f);
Expand Down
10 changes: 5 additions & 5 deletions src/Etterna/Singletons/ScoreManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ ScoresForChart::SetTopScores()
FOREACHM(int, ScoresAtRate, ScoresByRate, i)
{
auto& hs = i->second.noccPBptr;
if (hs && hs->GetSSRCalcVersion() == GetCalcVersion() &&
if (hs && hs->GetSSRCalcVersion() == GetCalcVersion_OLD() &&
hs->GetEtternaValid() && hs->GetChordCohesion() == 0 &&
hs->GetGrade() != Grade_Failed)
eligiblescores.emplace_back(hs);
Expand All @@ -247,7 +247,7 @@ ScoresForChart::SetTopScores()
FOREACHM(int, ScoresAtRate, ScoresByRate, i)
{
auto& hs = i->second.PBptr;
if (hs && hs->GetSSRCalcVersion() == GetCalcVersion() &&
if (hs && hs->GetSSRCalcVersion() == GetCalcVersion_OLD() &&
hs->GetEtternaValid() && hs->GetChordCohesion() != 0 &&
hs->GetGrade() != Grade_Failed)
eligiblescores.emplace_back(hs);
Expand Down Expand Up @@ -481,7 +481,7 @@ ScoreManager::RecalculateSSRs(LoadingWindow* ld, const string& profileID)
bool remarried = hs->RescoreToWife3(static_cast<float>(maxpoints));

// if this is not a rescore and has already been run on the current calc vers, skip
if (!remarried && hs->GetSSRCalcVersion() == GetCalcVersion())
if (!remarried && hs->GetSSRCalcVersion() == GetCalcVersion_OLD())
continue;

const auto& serializednd = nd.SerializeNoteData2(td);
Expand All @@ -491,7 +491,7 @@ ScoreManager::RecalculateSSRs(LoadingWindow* ld, const string& profileID)
auto ssrVals = dakine;
FOREACH_ENUM(Skillset, ss)
hs->SetSkillsetSSR(ss, ssrVals[ss]);
hs->SetSSRCalcVersion(GetCalcVersion());
hs->SetSSRCalcVersion(GetCalcVersion_OLD());

// we only want to upload scores that have been rescored to
// wife3, not generic calc changes, since the site runs its own
Expand Down Expand Up @@ -588,7 +588,7 @@ ScoreManager::AggregateSSRs(Skillset ss,
rating += res;
sum = 0.0;
for (int i = 0; i < static_cast<int>(TopSSRs.size()); i++) {
if (TopSSRs[i]->GetSSRCalcVersion() == GetCalcVersion() &&
if (TopSSRs[i]->GetSSRCalcVersion() == GetCalcVersion_OLD() &&
TopSSRs[i]->GetEtternaValid() &&
TopSSRs[i]->GetChordCohesion() == 0 &&
TopSSRs[i]->GetTopScore() != 0)
Expand Down

0 comments on commit 2a6684f

Please sign in to comment.