Skip to content

Commit

Permalink
fix overdrive crash (overdrive bit buggy until someone fixes the math)
Browse files Browse the repository at this point in the history
  • Loading branch information
AveryMadness authored Feb 29, 2024
1 parent bac4e58 commit 6ea34df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Encore/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ int main(int argc, char* argv[])

DrawLine3D(Vector3{ 2.5f, 0.05f, 2.0f }, Vector3{ -2.5f, 0.05f, 2.0f}, WHITE);
Chart& dmsExpert = songList.songs[curPlayingSong].parts[instrument]->charts[diff];
if (dmsExpert.odPhrases.size() > 0) {
if (dmsExpert.odPhrases.size() > 0 && curODPhrase < dmsExpert.odPhrases.size()) {
if (dmsExpert.notes[curNoteIdx].time+dmsExpert.notes[curNoteIdx].len > dmsExpert.odPhrases[curODPhrase].end && curODPhrase < dmsExpert.odPhrases.size()) curODPhrase++;
}
for (int i = curNoteIdx; i < dmsExpert.notes.size(); i++) {
Expand All @@ -593,7 +593,7 @@ int main(int argc, char* argv[])
double relTime = curNote.time - musicTime;
double relEnd = (curNote.time + curNote.len) - musicTime;
bool od = false;
if (dmsExpert.odPhrases.size() > 0) {
if (dmsExpert.odPhrases.size() > 0 && curODPhrase < dmsExpert.odPhrases.size()) {
if (curNote.time >= dmsExpert.odPhrases[curODPhrase].start && curNote.time <= dmsExpert.odPhrases[curODPhrase].end) {
od = true;
}
Expand Down

0 comments on commit 6ea34df

Please sign in to comment.