1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-09 18:44:51 +08:00

Fix some maps potentially starting with 0 health

This commit is contained in:
smoogipoo
2019-12-25 19:39:59 +09:00
Unverified
parent 90a0569660
commit 0454c5022d
+5 -1
View File
@@ -70,7 +70,11 @@ namespace osu.Game.Rulesets.Scoring
base.Update();
if (!IsBreakTime.Value)
Health.Value -= drainRate * Time.Elapsed;
{
// When jumping from before the gameplay start to after it or vice-versa, we only want to consider any drain since the gameplay start time
double lastTime = Math.Max(gameplayStartTime, Time.Current - Time.Elapsed);
Health.Value -= drainRate * (Time.Current - lastTime);
}
}
protected override void ApplyResultInternal(JudgementResult result)