Skip to content

Commit

Permalink
ok don't handle this with an assert, we can actually hit it
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed May 20, 2020
1 parent 914db51 commit eed784f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Etterna/Models/NoteData/NoteData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ NoteData::WifeTotalScoreCalc(TimingData* td, int iStartIndex, int iEndIndex)
}
}
}
ASSERT(taps > 0);

return taps * 2;
}

Expand Down
8 changes: 5 additions & 3 deletions src/Etterna/Singletons/ScoreManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<float>(maxpoints));
}
Expand All @@ -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<float> dakine;
if (steps->m_StepsType == StepsType_dance_single)
dakine = MinaSDCalc(serializednd, musicrate, ssrpercent);
Expand Down Expand Up @@ -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]);
}
Expand Down

0 comments on commit eed784f

Please sign in to comment.