Skip to content

Extend incomplete replays properly when mines are present#219

Merged
AiAe merged 1 commit into
Quaver:masterfrom
WilliamQiufeng:fix-incomplete-replay
Jul 3, 2026
Merged

Extend incomplete replays properly when mines are present#219
AiAe merged 1 commit into
Quaver:masterfrom
WilliamQiufeng:fix-incomplete-replay

Conversation

@WilliamQiufeng

@WilliamQiufeng WilliamQiufeng commented Jul 1, 2026

Copy link
Copy Markdown
Member

It was due to Qua.GetHitObjectAtJudgementIndex no longer being accurate way of doing the thing it's named because of the introduction of mines. Now we don't use it and just use ActiveMine/ActiveHitObjects/ActiveHeldLongNotes instead.

I found the bug and Codex fixed it. =)

@WilliamQiufeng WilliamQiufeng marked this pull request as draft July 1, 2026 20:50
@WilliamQiufeng WilliamQiufeng marked this pull request as ready for review July 1, 2026 20:51
@WilliamQiufeng WilliamQiufeng requested a review from Copilot July 1, 2026 20:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates VirtualReplayPlayer’s “extend incomplete replay” logic to avoid relying on Qua.GetHitObjectAtJudgementIndex, which became unreliable after mines were introduced, and instead bases extension on the remaining active object collections.

Changes:

  • Replaces the previous judgement-index-based extension loop with ExtendWithRemainingHitObjects().
  • Adds ExtendWithRemainingHitObjects() / AddMissedHitObject() helpers to synthesize miss judgements for still-active notes (and LN releases).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +177 to +199
foreach (var hitObject in ActiveHeldLongNotes.OrderBy(x => x.EndTime).ToList())
{
var missedReleaseJudgement = ScoreProcessor.Windows.LNMissJudgement.Value;
var stat = new HitStat(HitStatType.Miss, KeyPressType.None, hitObject, hitObject.EndTime,
missedReleaseJudgement, int.MinValue, ScoreProcessor.Accuracy, ScoreProcessor.Health);

ScoreProcessor.CalculateScore(missedReleaseJudgement, true);
ScoreProcessor.Stats.Add(stat);
ActiveHeldLongNotesToRemove.Add(hitObject);

if (ScoreProcessor.Failed)
return;
}

foreach (var hitObject in ActiveHitObjects.OrderBy(x => x.StartTime).ToList())
{
AddMissedHitObject(hitObject);
ActiveHitObjectsToRemove.Add(hitObject);

if (ScoreProcessor.Failed)
return;
}
}
@AiAe AiAe merged commit 293f490 into Quaver:master Jul 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants