1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 05:22:54 +08:00

Allow judging at most one swell tick per frame

This commit is contained in:
Bartłomiej Dach 2023-10-04 19:03:12 +02:00
parent 2ae1a24355
commit a1368df62f
No known key found for this signature in database

View File

@ -38,6 +38,8 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
private readonly CircularContainer targetRing;
private readonly CircularContainer expandingRing;
private double? lastPressHandleTime;
public override bool DisplayResult => false;
public DrawableSwell()
@ -140,6 +142,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
UnproxyContent();
lastWasCentre = null;
lastPressHandleTime = null;
}
protected override void AddNestedHitObject(DrawableHitObject hitObject)
@ -285,7 +288,14 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
if (lastWasCentre == isCentre)
return false;
// If we've already successfully judged a tick this frame, do not judge more.
// Note that the ordering is important here - this is intentionally placed after the alternating check.
// That is done to prevent accidental double inputs blocking simultaneous but legitimate hits from registering.
if (lastPressHandleTime == Time.Current)
return true;
lastWasCentre = isCentre;
lastPressHandleTime = Time.Current;
UpdateResult(true);