From f66c867d172ddcc1eb13a69fe63887477a7f5891 Mon Sep 17 00:00:00 2001 From: Holly Date: Sun, 10 Sep 2023 18:31:38 +0100 Subject: [PATCH] Fix spectator not working --- server/SpectatorManager.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/SpectatorManager.ts b/server/SpectatorManager.ts index 653bc46..ee06e5d 100644 --- a/server/SpectatorManager.ts +++ b/server/SpectatorManager.ts @@ -20,11 +20,13 @@ export default class SpectatorManager { let spectateStream:DataStream; if (userToSpectate.spectatorStream === undefined) { user.spectatorStream = spectateStream = userToSpectate.spectatorStream = this.shared.streams.CreateStream(`spectator:${userToSpectate.username}`); + } else { user.spectatorStream = spectateStream = userToSpectate.spectatorStream; } user.spectatingUser = userToSpectate; + spectateStream.AddUser(user); let osuPacketWriter = osu.Bancho.Writer();