mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 07:06:35 +09:00
Limit shake duration to ensure it doesn't overlap miss window
This commit is contained in:
@ -89,7 +89,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
var result = HitObject.HitWindows.ResultFor(timeOffset);
|
||||
if (result == HitResult.None)
|
||||
{
|
||||
Shake();
|
||||
Shake(Math.Abs(timeOffset) - HitObject.HitWindows.HalfWindowFor(HitResult.Miss));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
private OsuInputManager osuActionInputManager;
|
||||
internal OsuInputManager OsuActionInputManager => osuActionInputManager ?? (osuActionInputManager = GetContainingInputManager() as OsuInputManager);
|
||||
|
||||
protected virtual void Shake() => shakeContainer.Shake();
|
||||
protected virtual void Shake(double maximumLength) => shakeContainer.Shake(maximumLength);
|
||||
}
|
||||
|
||||
public enum ComboResult
|
||||
|
@ -30,8 +30,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
Position = slider.CurvePositionAt(completionProgress);
|
||||
}
|
||||
|
||||
public Action OnShake;
|
||||
public Action<double> OnShake;
|
||||
|
||||
protected override void Shake() => OnShake?.Invoke();
|
||||
protected override void Shake(double maximumLength) => OnShake?.Invoke(maximumLength);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user