1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-28 04:14:26 +08:00

Fix health display potentially desyncing from actual if health was changed during initial animation

This commit is contained in:
Bartłomiej Dach
2023-10-06 21:30:41 +02:00
Unverified
parent 58448d3dd9
commit ce0d4bd0df
+6 -1
View File
@@ -66,8 +66,8 @@ namespace osu.Game.Screens.Play.HUD
health = HealthProcessor.Health.GetBoundCopy();
health.BindValueChanged(h =>
{
Current.Value = h.NewValue;
finishInitialAnimation();
Current.Value = h.NewValue;
});
if (hudOverlay != null)
@@ -103,6 +103,11 @@ namespace osu.Game.Screens.Play.HUD
{
initialIncrease?.Cancel();
initialIncrease = null;
// aside from the repeating `initialIncrease` scheduled task,
// there may also be a `Current` transform in progress from that schedule.
// ensure it plays out fully, to prevent changes to `Current.Value` being discarded by the ongoing transform.
FinishTransforms();
}
private void onNewJudgement(JudgementResult judgement)