1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 05:27:23 +08:00

Fix multiplayer sounds playing too much after gameplay

Regressed in https://github.com/ppy/osu/pull/15936.

Closes #17295.
This commit is contained in:
Dean Herbert 2022-03-31 16:18:26 +09:00
parent ad14b7cac5
commit ef5e37c47a

View File

@ -37,21 +37,21 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
{
base.UserJoined(user);
userJoinedSample?.Play();
Scheduler.AddOnce(() => userJoinedSample?.Play());
}
protected override void UserLeft(MultiplayerRoomUser user)
{
base.UserLeft(user);
userLeftSample?.Play();
Scheduler.AddOnce(() => userLeftSample?.Play());
}
protected override void UserKicked(MultiplayerRoomUser user)
{
base.UserKicked(user);
userKickedSample?.Play();
Scheduler.AddOnce(() => userKickedSample?.Play());
}
private void hostChanged(ValueChangedEvent<APIUser> value)
@ -59,7 +59,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
// only play sound when the host changes from an already-existing host.
if (value.OldValue == null) return;
hostChangedSample?.Play();
Scheduler.AddOnce(() => hostChangedSample?.Play());
}
}
}