1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 18:33:22 +08:00

Merge pull request #19132 from peppy/fix-potential-crash

Fix potential crash in editor from transform time going below zero
This commit is contained in:
Dan Balasescu 2022-07-15 20:31:48 +09:00 committed by GitHub
commit 4514d5e97b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,7 +28,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
if (ParentObject.Judged) if (ParentObject.Judged)
return; return;
double remainingTime = ParentObject.HitStateUpdateTime - Time.Current; double remainingTime = Math.Max(0, ParentObject.HitStateUpdateTime - Time.Current);
// Note that the scale adjust here is 2 instead of DrawableSliderBall.FOLLOW_AREA to match legacy behaviour. // Note that the scale adjust here is 2 instead of DrawableSliderBall.FOLLOW_AREA to match legacy behaviour.
// This means the actual tracking area for gameplay purposes is larger than the sprite (but skins may be accounting for this). // This means the actual tracking area for gameplay purposes is larger than the sprite (but skins may be accounting for this).