mirror of
https://github.com/ppy/osu
synced 2024-12-14 02:46:27 +00: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();
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user