mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:17:23 +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:
parent
156a518068
commit
a9e4a0ed50
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user