Skip to content

Commit

Permalink
Improve bad logic for negative noterows in replay data
Browse files Browse the repository at this point in the history
for early first hits, the note still flies past the receptors but it gets scored
  • Loading branch information
poco0317 committed Nov 28, 2018
1 parent f54d91f commit 5da2462
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/PlayerAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<TapReplayResult> 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<TapReplayResult> toMerge = GetTapsToTapForRow(row);
output.insert(output.end(), toMerge.begin(), toMerge.end());
row = GetNextRowNoOffsets(row);
Expand Down Expand Up @@ -398,15 +398,15 @@ 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;
}
} else {
auto thing = m_ReplayTapMap.lower_bound(currentRow + 1);

if (thing == m_ReplayTapMap.end()) {
return -1;
return -100;
} else {
return thing->first;
}
Expand Down

0 comments on commit 5da2462

Please sign in to comment.