Fix some maps potentially starting with 0 health

This commit is contained in:
smoogipoo 2019-12-25 19:39:59 +09:00
parent 90a0569660
commit 0454c5022d

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)