From eed784f8bcd2621826f12431f1ab8ace12651bf0 Mon Sep 17 00:00:00 2001 From: "born a rick, raised a morty, died a jerry" Date: Wed, 20 May 2020 13:25:23 -0400 Subject: [PATCH] ok don't handle this with an assert, we can actually hit it --- src/Etterna/Models/NoteData/NoteData.cpp | 2 +- src/Etterna/Singletons/ScoreManager.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Etterna/Models/NoteData/NoteData.cpp b/src/Etterna/Models/NoteData/NoteData.cpp index 8dc6170c9f..40da06679c 100644 --- a/src/Etterna/Models/NoteData/NoteData.cpp +++ b/src/Etterna/Models/NoteData/NoteData.cpp @@ -180,7 +180,7 @@ NoteData::WifeTotalScoreCalc(TimingData* td, int iStartIndex, int iEndIndex) } } } - ASSERT(taps > 0); + return taps * 2; } diff --git a/src/Etterna/Singletons/ScoreManager.cpp b/src/Etterna/Singletons/ScoreManager.cpp index 820bce332b..ab8866afae 100644 --- a/src/Etterna/Singletons/ScoreManager.cpp +++ b/src/Etterna/Singletons/ScoreManager.cpp @@ -465,11 +465,13 @@ ScoreManager::RecalculateSSRs(LoadingWindow* ld, const string& profileID) // ghasgh we need to decompress to get maxpoints TimingData* td = steps->GetTimingData(); NoteData nd; - + bool remarried = false; if (hs->wife_ver != 3 && !hs->GetChordCohesion()) { steps->GetNoteData(nd); auto maxpoints = nd.WifeTotalScoreCalc(td); + if (maxpoints <= 0) + continue; remarried = hs->RescoreToWife3(static_cast(maxpoints)); } @@ -490,7 +492,7 @@ ScoreManager::RecalculateSSRs(LoadingWindow* ld, const string& profileID) if (!remarried) steps->GetNoteData(nd); - const auto& serializednd = nd.SerializeNoteData2(td); + const auto& serializednd = nd.SerializeNoteData2(td); vector dakine; if (steps->m_StepsType == StepsType_dance_single) dakine = MinaSDCalc(serializednd, musicrate, ssrpercent); @@ -792,7 +794,7 @@ ScoresAtRate::LoadFromNode(const XNode* node, // at some point it's not worth it just at this moment, and while it // sort of makes sense from a user convenience aspect to allow this, it // definitely does not make sense from a clarity or consistency - // perspective + // perspective if ((oldcalc || getremarried) && SONGMAN->IsChartLoaded(ck)) SCOREMAN->scorestorecalc.emplace_back(&scores[sk]); }