From e1897f9998065b499e758503ecff3d11cbaae880 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 5 Dec 2021 01:38:37 +0900 Subject: [PATCH] Don't debounce `MultiplayerRoomComposite` events This avoids accidental usage which could result in data being lost or ignored (as only the last `user` in a single frame would arrive). This was added specifically to debounce sample playback, but given that it's only debouncing on a single frame (hardly noticeable) I'm not going to add back support for that yet. It should be handled by sample playback concurrency or something more local to the usage. --- .../OnlinePlay/Multiplayer/MultiplayerRoomComposite.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerRoomComposite.cs b/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerRoomComposite.cs index 2f75f09a9f..7d2fe44c4e 100644 --- a/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerRoomComposite.cs +++ b/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerRoomComposite.cs @@ -32,9 +32,9 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer } private void invokeOnRoomUpdated() => Scheduler.AddOnce(OnRoomUpdated); - private void invokeUserJoined(MultiplayerRoomUser user) => Scheduler.AddOnce(UserJoined, user); - private void invokeUserKicked(MultiplayerRoomUser user) => Scheduler.AddOnce(UserKicked, user); - private void invokeUserLeft(MultiplayerRoomUser user) => Scheduler.AddOnce(UserLeft, user); + private void invokeUserJoined(MultiplayerRoomUser user) => Scheduler.Add(() => UserJoined(user)); + private void invokeUserKicked(MultiplayerRoomUser user) => Scheduler.Add(() => UserKicked(user)); + private void invokeUserLeft(MultiplayerRoomUser user) => Scheduler.Add(() => UserLeft(user)); private void invokeItemAdded(MultiplayerPlaylistItem item) => Schedule(() => PlaylistItemAdded(item)); private void invokeItemRemoved(long item) => Schedule(() => PlaylistItemRemoved(item)); private void invokeItemChanged(MultiplayerPlaylistItem item) => Schedule(() => PlaylistItemChanged(item));