Skip to content

Commit 4402db8

Browse files
committed
Fix another new ghost miss bug in Replays
1 parent 5820aa7 commit 4402db8

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

src/Etterna/Actor/Gameplay/PlayerReplay.cpp

+3-6
Original file line numberDiff line numberDiff line change
@@ -341,14 +341,11 @@ PlayerReplay::UpdateTapNotesMissedOlderThan(float fMissIfOlderThanSeconds)
341341
if (m_pPrimaryScoreKeeper)
342342
m_pPrimaryScoreKeeper->HandleTapScore(tn);
343343
} else {
344+
if ((PlayerAI::IsTapAtRowAndColumn(iter.Row(), iter.Track())))
345+
continue;
346+
344347
tn.result.tns = TNS_Miss;
345348

346-
// avoid scoring notes that get passed when seeking in pm
347-
// not sure how many rows grace time is needed (if any?)
348-
if (GAMESTATE->m_pPlayerState->m_PlayerOptions.GetCurrent()
349-
.m_bPractice &&
350-
iMissIfOlderThanThisRow - iter.Row() > 8)
351-
tn.result.tns = TNS_None;
352349
if (GAMESTATE->CountNotesSeparately()) {
353350
SetJudgment(iter.Row(), iter.Track(), tn);
354351
HandleTapRowScore(iter.Row());

src/Etterna/Models/Misc/PlayerAI.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,18 @@ PlayerAI::TapExistsAtOrBeforeThisRow(int noteRow)
248248
}
249249
}
250250

251+
bool
252+
PlayerAI::IsTapAtRowAndColumn(int noteRow, int col)
253+
{
254+
if (m_ReplayTapMap.count(noteRow) == 0)
255+
return false;
256+
for (auto& tap : m_ReplayTapMap[noteRow]) {
257+
if (tap.track == col)
258+
return true;
259+
}
260+
return false;
261+
}
262+
251263
vector<TapReplayResult>
252264
PlayerAI::GetTapsAtOrBeforeRow(int noteRow)
253265
{

src/Etterna/Models/Misc/PlayerAI.h

+2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ class PlayerAI
7373
// screen
7474
static void CalculateRadarValuesForReplay(RadarValues& rv,
7575
RadarValues& possibleRV);
76+
// Find a tap at the given row and column
77+
static bool IsTapAtRowAndColumn(int noteRow, int col);
7678
};
7779

7880
#endif

0 commit comments

Comments
 (0)