From 5da2462f52e2bc5f85eeb7d8d458984558c67004 Mon Sep 17 00:00:00 2001 From: poco0317 Date: Wed, 28 Nov 2018 17:51:35 -0600 Subject: [PATCH] Improve bad logic for negative noterows in replay data for early first hits, the note still flies past the receptors but it gets scored --- src/PlayerAI.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/PlayerAI.cpp b/src/PlayerAI.cpp index d03c27c265..e2b757790f 100644 --- a/src/PlayerAI.cpp +++ b/src/PlayerAI.cpp @@ -344,17 +344,17 @@ PlayerAI::GetTapsAtOrBeforeRow(int noteRow) // 2 is a replay with column data if (pScoreData->GetReplayType() == 2) { - auto rowIt = m_ReplayExactTapMap.lower_bound(0); + auto rowIt = m_ReplayExactTapMap.lower_bound(-100); int row = rowIt->first; - for (; row <= noteRow && row != -1;) { + for (; row <= noteRow && row != -100;) { vector toMerge = GetTapsToTapForRow(row); output.insert(output.end(), toMerge.begin(), toMerge.end()); row = GetNextRowNoOffsets(row); } } else { - auto rowIt = m_ReplayTapMap.lower_bound(0); + auto rowIt = m_ReplayTapMap.lower_bound(-100); int row = rowIt->first; - for (; row <= noteRow && row != -1;) { + for (; row <= noteRow && row != -100;) { vector toMerge = GetTapsToTapForRow(row); output.insert(output.end(), toMerge.begin(), toMerge.end()); row = GetNextRowNoOffsets(row); @@ -398,7 +398,7 @@ PlayerAI::GetNextRowNoOffsets(int currentRow) auto thing = m_ReplayExactTapMap.lower_bound(currentRow + 1); if (thing == m_ReplayExactTapMap.end()) { - return -1; + return -100; } else { return thing->first; } @@ -406,7 +406,7 @@ PlayerAI::GetNextRowNoOffsets(int currentRow) auto thing = m_ReplayTapMap.lower_bound(currentRow + 1); if (thing == m_ReplayTapMap.end()) { - return -1; + return -100; } else { return thing->first; }