1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 04:32:57 +08:00

Fix taiko maps containing only drum rolls / swells not being passable without mods

Closes https://github.com/ppy/osu/issues/26370.

As was noted in the issue thread stable does not attempt to account for
such maps, and the maps are impassable in stable without No Fail.
Nevertheless that seems like a pretty anti-player behaviour and I
honestly believe that it is fine to change this in lazer.
This commit is contained in:
Bartłomiej Dach 2024-01-16 20:18:32 +01:00
parent 190f30a4b3
commit fc37c5e4c2
No known key found for this signature in database

View File

@ -31,11 +31,39 @@ namespace osu.Game.Rulesets.Taiko.Scoring
/// </summary>
private double hpMissMultiplier;
/// <summary>
/// Sum of all achievable health increases throughout the map.
/// Used to determine if there are any objects that give health.
/// If there are none, health will be forcibly pulled up to 1 to avoid cases of impassable maps.
/// </summary>
private double sumOfMaxHealthIncreases;
public TaikoHealthProcessor()
: base(0.5)
{
}
protected override void ApplyResultInternal(JudgementResult result)
{
base.ApplyResultInternal(result);
sumOfMaxHealthIncreases += result.Judgement.MaxHealthIncrease;
}
protected override void RevertResultInternal(JudgementResult result)
{
base.RevertResultInternal(result);
sumOfMaxHealthIncreases -= result.Judgement.MaxHealthIncrease;
}
protected override void Reset(bool storeResults)
{
base.Reset(storeResults);
if (storeResults && sumOfMaxHealthIncreases == 0)
Health.Value = 1;
sumOfMaxHealthIncreases = 0;
}
public override void ApplyBeatmap(IBeatmap beatmap)
{
base.ApplyBeatmap(beatmap);