1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-15 15:27:20 +08:00

Force hit sample to play when Classic mod is enabled

This commit is contained in:
Amber 2021-04-02 02:54:35 -05:00
parent 133c529b2d
commit 5063cd957f
3 changed files with 11 additions and 1 deletions

View File

@ -79,6 +79,10 @@ namespace osu.Game.Rulesets.Osu.Mods
case DrawableSliderHead head:
head.TrackFollowCircle = !NoSliderHeadMovement.Value;
break;
case DrawableSliderTail tail:
tail.AlwaysPlaySample = true;
break;
}
}
}

View File

@ -280,7 +280,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
{
// rather than doing it this way, we should probably attach the sample to the tail circle.
// this can only be done after we stop using LegacyLastTick.
if (TailCircle.IsHit)
if (TailCircle.IsHit || TailCircle.AlwaysPlaySample)
base.PlaySamples();
}

View File

@ -26,6 +26,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
/// </summary>
public override bool DisplayResult => false;
/// <summary>
/// Whether the hit sample should always be played, regardless of whether the tail was actually hit.
/// </summary>
public bool AlwaysPlaySample { get; set; }
public bool Tracking { get; set; }
private SkinnableDrawable circlePiece;
@ -44,6 +49,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
[BackgroundDependencyLoader]
private void load()
{
AlwaysPlaySample = false;
Origin = Anchor.Centre;
Size = new Vector2(OsuHitObject.OBJECT_RADIUS * 2);