Skip to content

Commit

Permalink
fix replays always dropping first note on playback if hit early
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Jan 8, 2023
1 parent 482ac7e commit 9addca6
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/Etterna/Models/HighScore/Replay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2879,9 +2879,17 @@ Replay::GeneratePlaybackEvents(int startRow) -> std::map<int, std::vector<Playba
const auto positionSeconds = evt.songPositionSeconds;

const auto noterow =
BeatToNoteRow(td->GetBeatFromElapsedTimeNoOffset(positionSeconds));
if (noterow < startRow) {
continue;
BeatToNoteRow(td->GetBeatFromElapsedTime(positionSeconds));
if (evt.nearestTapNoterow < startRow) {
if (evt.nearestTapNoterow == -1) {
// for ghost taps, only remove them if they are truly too early
if (noterow < startRow) {
continue;
}
} else {
// these are taps which judge a note earlier than we care
continue;
}
}

PlaybackEvent playback(noterow, positionSeconds, column, isPress);
Expand Down

0 comments on commit 9addca6

Please sign in to comment.