mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 06:05:07 +08:00
Fix some maps potentially starting with 0 health
This commit is contained in:
parent
90a0569660
commit
0454c5022d
@ -70,7 +70,11 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
if (!IsBreakTime.Value)
|
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)
|
protected override void ApplyResultInternal(JudgementResult result)
|
||||||
|
Loading…
Reference in New Issue
Block a user