Skip to content

Commit

Permalink
Fix another new ghost miss bug in Replays
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Sep 8, 2019
1 parent 5820aa7 commit 4402db8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Etterna/Actor/Gameplay/PlayerReplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,11 @@ PlayerReplay::UpdateTapNotesMissedOlderThan(float fMissIfOlderThanSeconds)
if (m_pPrimaryScoreKeeper)
m_pPrimaryScoreKeeper->HandleTapScore(tn);
} else {
if ((PlayerAI::IsTapAtRowAndColumn(iter.Row(), iter.Track())))
continue;

tn.result.tns = TNS_Miss;

// avoid scoring notes that get passed when seeking in pm
// not sure how many rows grace time is needed (if any?)
if (GAMESTATE->m_pPlayerState->m_PlayerOptions.GetCurrent()
.m_bPractice &&
iMissIfOlderThanThisRow - iter.Row() > 8)
tn.result.tns = TNS_None;
if (GAMESTATE->CountNotesSeparately()) {
SetJudgment(iter.Row(), iter.Track(), tn);
HandleTapRowScore(iter.Row());
Expand Down
12 changes: 12 additions & 0 deletions src/Etterna/Models/Misc/PlayerAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,18 @@ PlayerAI::TapExistsAtOrBeforeThisRow(int noteRow)
}
}

bool
PlayerAI::IsTapAtRowAndColumn(int noteRow, int col)
{
if (m_ReplayTapMap.count(noteRow) == 0)
return false;
for (auto& tap : m_ReplayTapMap[noteRow]) {
if (tap.track == col)
return true;
}
return false;
}

vector<TapReplayResult>
PlayerAI::GetTapsAtOrBeforeRow(int noteRow)
{
Expand Down
2 changes: 2 additions & 0 deletions src/Etterna/Models/Misc/PlayerAI.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ class PlayerAI
// screen
static void CalculateRadarValuesForReplay(RadarValues& rv,
RadarValues& possibleRV);
// Find a tap at the given row and column
static bool IsTapAtRowAndColumn(int noteRow, int col);
};

#endif

0 comments on commit 4402db8

Please sign in to comment.