diff --git a/Assets/Scripts/Control&Input/Peer2PeerTransport.cs b/Assets/Scripts/Control&Input/Peer2PeerTransport.cs index 479e3c716..273c489fb 100644 --- a/Assets/Scripts/Control&Input/Peer2PeerTransport.cs +++ b/Assets/Scripts/Control&Input/Peer2PeerTransport.cs @@ -360,11 +360,13 @@ private void OnSpawnPlayerInput(NetworkConnectionToClient connection, PlayerConn { isConnectionAlreadyPresent = false; connections.Add(connection); - connectedPlayers.Add((uint)playerIndex); } + + // Register player if (!playersForConnection.ContainsKey(connection.connectionId)) playersForConnection[connection.connectionId] = new(); playersForConnection[connection.connectionId].Add((uint)playerIndex); + connectedPlayers.Add((uint)playerIndex); // Determine metadata var playerType = PlayerType.Local;