mirror of
https://github.com/ppy/osu.git
synced 2024-09-21 14:47:25 +08:00
Merge pull request #12265 from amberkowalski/classic-slidertail
Add classic mod setting to always play slider tail samples
This commit is contained in:
commit
dac8e5fdf4
@ -44,6 +44,9 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
[SettingSource("Use fixed slider follow circle hit area", "Makes the slider follow circle track its final size at all times.")]
|
||||
public Bindable<bool> FixedFollowCircleHitArea { get; } = new BindableBool(true);
|
||||
|
||||
[SettingSource("Always play a slider's tail sample", "Always plays a slider's tail sample regardless of whether it was hit or not.")]
|
||||
public Bindable<bool> AlwaysPlayTailSample { get; } = new BindableBool(true);
|
||||
|
||||
public void ApplyToHitObject(HitObject hitObject)
|
||||
{
|
||||
switch (hitObject)
|
||||
@ -79,6 +82,10 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
case DrawableSliderHead head:
|
||||
head.TrackFollowCircle = !NoSliderHeadMovement.Value;
|
||||
break;
|
||||
|
||||
case DrawableSliderTail tail:
|
||||
tail.SamplePlaysOnlyOnHit = !AlwaysPlayTailSample.Value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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.SamplePlaysOnlyOnHit || TailCircle.IsHit)
|
||||
base.PlaySamples();
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,12 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
/// </summary>
|
||||
public override bool DisplayResult => false;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the hit samples only play on successful hits.
|
||||
/// If <c>false</c>, the hit samples will also play on misses.
|
||||
/// </summary>
|
||||
public bool SamplePlaysOnlyOnHit { get; set; } = true;
|
||||
|
||||
public bool Tracking { get; set; }
|
||||
|
||||
private SkinnableDrawable circlePiece;
|
||||
|
Loading…
Reference in New Issue
Block a user