mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 16:02:55 +08:00
Merge pull request #26561 from peppy/fix-catch-banana-health-bar
Fix argon health bar showing "miss" bar for bananas
This commit is contained in:
commit
cde0c0b2ee
@ -94,6 +94,11 @@ namespace osu.Game.Rulesets.Judgements
|
||||
/// </summary>
|
||||
public bool IsHit => Type.IsHit();
|
||||
|
||||
/// <summary>
|
||||
/// The increase in health resulting from this judgement result.
|
||||
/// </summary>
|
||||
public double HealthIncrease => Judgement.HealthIncreaseFor(this);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="JudgementResult"/>.
|
||||
/// </summary>
|
||||
|
@ -66,7 +66,7 @@ namespace osu.Game.Rulesets.Scoring
|
||||
/// </summary>
|
||||
/// <param name="result">The <see cref="JudgementResult"/>.</param>
|
||||
/// <returns>The health increase.</returns>
|
||||
protected virtual double GetHealthIncreaseFor(JudgementResult result) => result.Judgement.HealthIncreaseFor(result);
|
||||
protected virtual double GetHealthIncreaseFor(JudgementResult result) => result.HealthIncrease;
|
||||
|
||||
/// <summary>
|
||||
/// The default conditions for failing.
|
||||
|
@ -136,7 +136,12 @@ namespace osu.Game.Screens.Play.HUD
|
||||
BarHeight.BindValueChanged(_ => updateContentSize(), true);
|
||||
}
|
||||
|
||||
private void onNewJudgement(JudgementResult result) => pendingMissAnimation |= !result.IsHit;
|
||||
private void onNewJudgement(JudgementResult result)
|
||||
{
|
||||
// Check the health increase because cases like osu!catch bananas fire `IgnoreMiss`,
|
||||
// which counts as a miss but doesn't actually subtract any health.
|
||||
pendingMissAnimation |= !result.IsHit && result.HealthIncrease < 0;
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user