Switch ModMuted to add its metronome to components rather than overlays

This commit is contained in:
Dean Herbert 2023-02-21 19:04:06 +09:00
parent 1acc536248
commit 9384687d6d

View File

@ -67,7 +67,8 @@ namespace osu.Game.Rulesets.Mods
{
MetronomeBeat metronomeBeat;
drawableRuleset.Overlays.Add(metronomeBeat = new MetronomeBeat(drawableRuleset.Beatmap.HitObjects.First().StartTime));
// Importantly, this is added to FrameStableComponents and not Overlays as the latter would cause it to be self-muted by the mod's volume adjustment.
drawableRuleset.FrameStableComponents.Add(metronomeBeat = new MetronomeBeat(drawableRuleset.Beatmap.HitObjects.First().StartTime));
metronomeBeat.AddAdjustment(AdjustableProperty.Volume, metronomeVolumeAdjust);
}