Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leaving a multiplayer lobby now plays the "host leaving" sound #30665

Open
diediediebitch opened this issue Nov 15, 2024 · 2 comments
Open

Leaving a multiplayer lobby now plays the "host leaving" sound #30665

diediediebitch opened this issue Nov 15, 2024 · 2 comments

Comments

@diediediebitch
Copy link

Type

Game behaviour

Bug description

When you leave a multiplayer lobby it will play the sound of the host in your lobby leaving as well as the original leave game sound

I'm assuming this isn't intended and I checked the changelog and it wasn't mentioned

Screenshots or videos

No response

Version

2024.1115.2

Logs

compressed-logs.zip

@peppy
Copy link
Member

peppy commented Nov 16, 2024

@smoogipoo likely one for you

@smoogipoo
Copy link
Contributor

smoogipoo commented Nov 16, 2024

The fix appears to be something along the lines of:

diff --git a/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerRoomSounds.cs b/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerRoomSounds.cs
index d53e485c86..5da6e0a19d 100644
--- a/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerRoomSounds.cs
+++ b/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerRoomSounds.cs
@@ -50,7 +50,7 @@ private void updateState()
                 return;
 
             // only play sound when the host changes from an already-existing host.
-            if (host != null)
+            if (host != null && client.Room?.Host != null)
                 Scheduler.AddOnce(() => hostChangedSample?.Play());
 
             host = client.Room?.Host;

Though I'm not sure about committing this now or after #30634 .

@smoogipoo smoogipoo self-assigned this Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants