Skip to content

Commit

Permalink
fix mine hits breaking replay playback slightly
Browse files Browse the repository at this point in the history
??? this misaligned some hits temporarily, which would somehow self correct. this let me hit notes at like 800ms off which made no sense and somehow this little check just fixes it. didnt feel like figuring out why i wrote the function this way which caused the issue in the first place. thats how we do it around here
  • Loading branch information
poco0317 committed Mar 22, 2023
1 parent 21a74ad commit febd5ed
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions src/Etterna/Actor/Gameplay/PlayerReplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -767,13 +767,21 @@ PlayerReplay::Step(int col,
fNoteOffset = (fStepSeconds - fPositionSeconds) /
REPLAYS->GetActiveReplay()->GetMusicRate();

NOTESKIN->SetLastSeenColor(
NoteTypeToString(GetNoteType(rowBeingJudged)));

TapNote* pTN = nullptr;
auto closestNR = GetClosestNote(
col, rowBeingJudged, MAX_NOTE_ROW, MAX_NOTE_ROW, false, false);

if (closestNR != rowBeingJudged) {
// BANDAID BANDAID BANDAID
// BANDAID BANDAID BANDAID
Locator::getLogger()->trace(
"Dumped PlayerReplay input because it might break something: closestnr {} "
"- beingjudged {} - rowtojudge {}",
closestNR,
rowBeingJudged,
rowToJudge);
return;
}

if (closestNR == -1 && !bRelease) {
// the last notes of the file will trigger this due to releases
// go ahead and skip releases
Expand All @@ -786,9 +794,12 @@ PlayerReplay::Step(int col,
rowToJudge);
return;
}
auto iter = m_NoteData.FindTapNote(col, closestNR);

pTN = &iter->second;
NOTESKIN->SetLastSeenColor(
NoteTypeToString(GetNoteType(rowBeingJudged)));

auto iter = m_NoteData.FindTapNote(col, closestNR);
TapNote* pTN = &iter->second;

// We don't really have to care if we are releasing on a non-lift,
// right? This fixes a weird noteskin bug with tap explosions.
Expand Down

0 comments on commit febd5ed

Please sign in to comment.