Skip to content

Commit

Permalink
Merge pull request #332 from Beamographic/Hotfix-replays
Browse files Browse the repository at this point in the history
Fix replays not being perfect
  • Loading branch information
LumpBloom7 authored Oct 26, 2023
2 parents 95252d4 + 2e29ea0 commit 1d96bb5
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions osu.Game.Rulesets.Rush/Objects/Drawables/DrawableStarSheet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,16 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)
ApplyResult(r => r.Type = r.Judgement.MaxResult);
}

private bool iHandledPressed = false;

protected override void OnApply()
{
base.OnApply();

iHandledPressed = false;
}


public override bool OnPressed(KeyBindingPressEvent<RushAction> e)
{
if (!e.Action.IsLaneAction())
Expand All @@ -184,13 +194,15 @@ public override bool OnPressed(KeyBindingPressEvent<RushAction> e)
return false;

UpdateResult(true);
return Head.Judged;

return iHandledPressed = Head.Judged;
}

public override void OnReleased(KeyBindingReleaseEvent<RushAction> e)
{
// TODO: HACK FIX FOR HOTFIX, NEEDS FURTHER INVESTIGATION
if (!IsInUse)
// This is necessary to ensure that holds don't handle releases before handling the press
// TODO: Get rid when things are fixed osu side.
if (!iHandledPressed)
return;

if (AllJudged)
Expand Down

0 comments on commit 1d96bb5

Please sign in to comment.