mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Remove PlayingUsers list from SpectatorClient
This commit is contained in:
@ -6,7 +6,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
@ -42,7 +41,7 @@ namespace osu.Game.Tests.Visual.Spectator
|
||||
{
|
||||
OnNewFrames += (i, bundle) =>
|
||||
{
|
||||
if (PlayingUsers.Contains(i))
|
||||
if (PlayingUserStates.ContainsKey(i))
|
||||
lastReceivedUserFrames[i] = bundle.Frames[^1];
|
||||
};
|
||||
}
|
||||
@ -65,7 +64,7 @@ namespace osu.Game.Tests.Visual.Spectator
|
||||
/// <param name="userId">The user to end play for.</param>
|
||||
public void EndPlay(int userId)
|
||||
{
|
||||
if (!PlayingUsers.Contains(userId))
|
||||
if (!PlayingUserStates.ContainsKey(userId))
|
||||
return;
|
||||
|
||||
((ISpectatorClient)this).UserFinishedPlaying(userId, new SpectatorState
|
||||
@ -131,7 +130,7 @@ namespace osu.Game.Tests.Visual.Spectator
|
||||
protected override Task WatchUserInternal(int userId)
|
||||
{
|
||||
// When newly watching a user, the server sends the playing state immediately.
|
||||
if (PlayingUsers.Contains(userId))
|
||||
if (PlayingUserStates.ContainsKey(userId))
|
||||
sendPlayingState(userId);
|
||||
|
||||
return Task.CompletedTask;
|
||||
|
Reference in New Issue
Block a user