mirror of
https://github.com/ppy/osu.git
synced 2026-05-23 16:20:30 +08:00
Fix potentially starting play when finished
The UserFinishedPlaying event may trigger before the event is subscribed to by SpectatorScreen. For such cases, an extra check is done to make sure the user is _actually_ playing.
This commit is contained in:
@@ -127,6 +127,10 @@ namespace osu.Game.Screens.Spectate
|
||||
if (!userMap.ContainsKey(userId))
|
||||
return;
|
||||
|
||||
// The user may have stopped playing.
|
||||
if (!spectatorClient.TryGetPlayingUserState(userId, out _))
|
||||
return;
|
||||
|
||||
Schedule(() => OnUserStateChanged(userId, state));
|
||||
|
||||
updateGameplayState(userId);
|
||||
|
||||
Reference in New Issue
Block a user