mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 12:33:01 +08:00
Merge pull request #22129 from smoogipoo/remove-mania-hp-drain
Remove mania hp drain
This commit is contained in:
commit
2b0aee0e3e
@ -52,7 +52,7 @@ namespace osu.Game.Rulesets.Mania
|
||||
|
||||
public override ScoreProcessor CreateScoreProcessor() => new ManiaScoreProcessor();
|
||||
|
||||
public override HealthProcessor CreateHealthProcessor(double drainStartTime) => new ManiaHealthProcessor(drainStartTime, 0.5);
|
||||
public override HealthProcessor CreateHealthProcessor(double drainStartTime) => new ManiaHealthProcessor(drainStartTime);
|
||||
|
||||
public override IBeatmapConverter CreateBeatmapConverter(IBeatmap beatmap) => new ManiaBeatmapConverter(beatmap, this);
|
||||
|
||||
|
@ -11,8 +11,8 @@ namespace osu.Game.Rulesets.Mania.Scoring
|
||||
public partial class ManiaHealthProcessor : DrainingHealthProcessor
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public ManiaHealthProcessor(double drainStartTime, double drainLenience = 0)
|
||||
: base(drainStartTime, drainLenience)
|
||||
public ManiaHealthProcessor(double drainStartTime)
|
||||
: base(drainStartTime, 1.0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ namespace osu.Game.Rulesets.Scoring
|
||||
public DrainingHealthProcessor(double drainStartTime, double drainLenience = 0)
|
||||
{
|
||||
this.drainStartTime = drainStartTime;
|
||||
this.drainLenience = drainLenience;
|
||||
this.drainLenience = Math.Clamp(drainLenience, 0, 1);
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
@ -79,7 +79,8 @@ namespace osu.Game.Rulesets.Scoring
|
||||
double lastGameplayTime = Math.Clamp(Time.Current - Time.Elapsed, drainStartTime, gameplayEndTime);
|
||||
double currentGameplayTime = Math.Clamp(Time.Current, drainStartTime, gameplayEndTime);
|
||||
|
||||
Health.Value -= drainRate * (currentGameplayTime - lastGameplayTime);
|
||||
if (drainLenience < 1)
|
||||
Health.Value -= drainRate * (currentGameplayTime - lastGameplayTime);
|
||||
}
|
||||
|
||||
public override void ApplyBeatmap(IBeatmap beatmap)
|
||||
|
Loading…
Reference in New Issue
Block a user