mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +08:00
Allow judging at most one swell tick per frame
This commit is contained in:
parent
2ae1a24355
commit
a1368df62f
@ -38,6 +38,8 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
private readonly CircularContainer targetRing;
|
private readonly CircularContainer targetRing;
|
||||||
private readonly CircularContainer expandingRing;
|
private readonly CircularContainer expandingRing;
|
||||||
|
|
||||||
|
private double? lastPressHandleTime;
|
||||||
|
|
||||||
public override bool DisplayResult => false;
|
public override bool DisplayResult => false;
|
||||||
|
|
||||||
public DrawableSwell()
|
public DrawableSwell()
|
||||||
@ -140,6 +142,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
UnproxyContent();
|
UnproxyContent();
|
||||||
|
|
||||||
lastWasCentre = null;
|
lastWasCentre = null;
|
||||||
|
lastPressHandleTime = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void AddNestedHitObject(DrawableHitObject hitObject)
|
protected override void AddNestedHitObject(DrawableHitObject hitObject)
|
||||||
@ -285,7 +288,14 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
if (lastWasCentre == isCentre)
|
if (lastWasCentre == isCentre)
|
||||||
return false;
|
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;
|
lastWasCentre = isCentre;
|
||||||
|
lastPressHandleTime = Time.Current;
|
||||||
|
|
||||||
UpdateResult(true);
|
UpdateResult(true);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user