mirror of
https://github.com/ppy/osu.git
synced 2025-03-14 05:47:20 +08:00
Fix DHO expires while hit sound is playing
This commit is contained in:
parent
6c41830d4d
commit
6c46046c24
@ -453,7 +453,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
state.Value = newState;
|
||||
|
||||
if (LifetimeEnd == double.MaxValue && (state.Value != ArmedState.Idle || HitObject.HitWindows == null))
|
||||
Expire();
|
||||
LifetimeEnd = Math.Max(LatestTransformEndTime, HitStateUpdateTime + (Samples?.Length ?? 0));
|
||||
|
||||
// apply any custom state overrides
|
||||
ApplyCustomUpdateState?.Invoke(this, newState);
|
||||
|
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Threading;
|
||||
@ -12,6 +13,8 @@ namespace osu.Game.Skinning
|
||||
{
|
||||
public class PausableSkinnableSound : SkinnableSound
|
||||
{
|
||||
public double Length => SamplesContainer.Children.Count == 0 ? 0 : SamplesContainer.Children.Max(sample => sample.Length);
|
||||
|
||||
protected bool RequestedPlaying { get; private set; }
|
||||
|
||||
public PausableSkinnableSound(ISampleInfo hitSamples)
|
||||
|
Loading…
x
Reference in New Issue
Block a user