From 477d430a3fe8004ed252e653864ce4370f98dcb0 Mon Sep 17 00:00:00 2001 From: Robin Rolf Date: Tue, 30 Jan 2024 02:48:02 +0100 Subject: [PATCH] Test fixes & ForceShown test --- Assets/Mirror/Core/InterestManagementBase.cs | 2 +- ...erestManagementTests_FastSpatialHashing.cs | 51 +++++++++++++++++-- 2 files changed, 48 insertions(+), 5 deletions(-) diff --git a/Assets/Mirror/Core/InterestManagementBase.cs b/Assets/Mirror/Core/InterestManagementBase.cs index b8e1311a4..681448bd2 100644 --- a/Assets/Mirror/Core/InterestManagementBase.cs +++ b/Assets/Mirror/Core/InterestManagementBase.cs @@ -78,7 +78,7 @@ protected void RemoveObserver(NetworkConnectionToClient connection, NetworkIdent /// For ForceShown: Makes sure all ready connections (that aren't already) are added to observers protected void AddObserversAllReady(NetworkIdentity identity) { - foreach (NetworkConnectionToClient connection in identity.observers.Values) + foreach (NetworkConnectionToClient connection in NetworkServer.connections.Values) { if (connection.isReady && !identity.observers.ContainsKey(connection.connectionId)) { diff --git a/Assets/Mirror/Tests/Editor/InterestManagement/InterestManagementTests_FastSpatialHashing.cs b/Assets/Mirror/Tests/Editor/InterestManagement/InterestManagementTests_FastSpatialHashing.cs index 345ce40e9..79879c7f7 100644 --- a/Assets/Mirror/Tests/Editor/InterestManagement/InterestManagementTests_FastSpatialHashing.cs +++ b/Assets/Mirror/Tests/Editor/InterestManagement/InterestManagementTests_FastSpatialHashing.cs @@ -24,10 +24,14 @@ protected NetworkIdentity CreatePlayerNI(int connectionId, Action