mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Silence hit sounds while seeking
This commit is contained in:
@ -17,6 +17,7 @@ using osu.Game.Rulesets.Objects.Types;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Skinning;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Screens.Play;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Rulesets.Objects.Drawables
|
||||
@ -348,6 +349,9 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
{
|
||||
}
|
||||
|
||||
[Resolved(canBeNull: true)]
|
||||
private GameplayClock gameplayClock { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Plays all the hit sounds for this <see cref="DrawableHitObject"/>.
|
||||
/// This is invoked automatically when this <see cref="DrawableHitObject"/> is hit.
|
||||
@ -356,7 +360,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
{
|
||||
const float balance_adjust_amount = 0.4f;
|
||||
|
||||
if (Samples != null)
|
||||
if (Samples != null && gameplayClock?.IsSeeking != true)
|
||||
{
|
||||
Samples.Balance.Value = balance_adjust_amount * (userPositionalHitSounds.Value ? SamplePlaybackPosition - 0.5f : 0);
|
||||
Samples.Play();
|
||||
|
Reference in New Issue
Block a user