Skip to content

Commit

Permalink
Fix replays not being perfect
Browse files Browse the repository at this point in the history
Hack fix for now
  • Loading branch information
LumpBloom7 committed Oct 26, 2023
1 parent 95252d4 commit 2e29ea0
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 2e29ea0

Please sign in to comment.