Skip to content

Commit

Permalink
Merge pull request #31967 from peppy/fix-results-applause-sound-overload
Browse files Browse the repository at this point in the history
Fix results screen applause playing too loud during multiplayer spectating
  • Loading branch information
peppy authored Feb 20, 2025
2 parents 97c69cf + a75ec75 commit 5d73af1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Logging;
using osu.Game.Beatmaps;
using osu.Game.Graphics.UserInterface;
using osu.Game.Rulesets;
Expand Down Expand Up @@ -128,8 +129,12 @@ public bool Mute
get => mute;
set
{
if (mute == value)
return;

mute = value;
volumeAdjustment.Value = value ? 0 : 1;
Logger.Log($"{(mute ? "muting" : "unmuting")} player {UserId}");
}
}

Expand Down
1 change: 0 additions & 1 deletion osu.Game/Screens/Play/KiaiGameplayFountains.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Logging;
using osu.Framework.Utils;
using osu.Game.Configuration;
using osu.Game.Graphics.Containers;
Expand Down
2 changes: 2 additions & 0 deletions osu.Game/Screens/Ranking/ResultsScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ public void PlayApplause(ScoreRank rank)
if (!this.IsCurrentScreen() || s != rankApplauseSound)
return;

AddInternal(rankApplauseSound);

rankApplauseSound.VolumeTo(applause_volume);
rankApplauseSound.Play();
});
Expand Down

0 comments on commit 5d73af1

Please sign in to comment.