mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 05:53:10 +08:00
Merge pull request #21371 from peppy/fix-mania-hold-note-stuck
Fix osu!mania hold notes occasionally getting in a visually incorrect hit state
This commit is contained in:
commit
2e4dc7c467
@ -262,14 +262,24 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
|||||||
tick.MissForcefully();
|
tick.MissForcefully();
|
||||||
}
|
}
|
||||||
|
|
||||||
ApplyResult(r => r.Type = Tail.IsHit ? r.Judgement.MaxResult : r.Judgement.MinResult);
|
if (Tail.IsHit)
|
||||||
endHold();
|
ApplyResult(r => r.Type = r.Judgement.MaxResult);
|
||||||
|
else
|
||||||
|
MissForcefully();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Tail.Judged && !Tail.IsHit)
|
if (Tail.Judged && !Tail.IsHit)
|
||||||
HoldBrokenTime = Time.Current;
|
HoldBrokenTime = Time.Current;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void MissForcefully()
|
||||||
|
{
|
||||||
|
base.MissForcefully();
|
||||||
|
|
||||||
|
// Important that this is always called when a result is applied.
|
||||||
|
endHold();
|
||||||
|
}
|
||||||
|
|
||||||
public bool OnPressed(KeyBindingPressEvent<ManiaAction> e)
|
public bool OnPressed(KeyBindingPressEvent<ManiaAction> e)
|
||||||
{
|
{
|
||||||
if (AllJudged)
|
if (AllJudged)
|
||||||
|
@ -87,7 +87,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Causes this <see cref="DrawableManiaHitObject"/> to get missed, disregarding all conditions in implementations of <see cref="DrawableHitObject.CheckForResult"/>.
|
/// Causes this <see cref="DrawableManiaHitObject"/> to get missed, disregarding all conditions in implementations of <see cref="DrawableHitObject.CheckForResult"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void MissForcefully() => ApplyResult(r => r.Type = r.Judgement.MinResult);
|
public virtual void MissForcefully() => ApplyResult(r => r.Type = r.Judgement.MinResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract class DrawableManiaHitObject<TObject> : DrawableManiaHitObject
|
public abstract class DrawableManiaHitObject<TObject> : DrawableManiaHitObject
|
||||||
|
Loading…
Reference in New Issue
Block a user