fix: Fix Room Slots for clients (#1439)

* Fix Room Slots for clients

* Removed change to ServerChangeScene
This commit is contained in:
MrGadget 2020-01-19 05:39:26 -05:00 committed by vis2k
parent cb4be4df78
commit 268753c3bd
2 changed files with 3 additions and 3 deletions

View File

@ -282,11 +282,9 @@ public override void OnServerAddPlayer(NetworkConnection conn)
NetworkRoomPlayer newRoomPlayer = newRoomGameObject.GetComponent<NetworkRoomPlayer>();
roomSlots.Add(newRoomPlayer);
NetworkServer.AddPlayerForConnection(conn, newRoomGameObject);
RecalculateRoomPlayerIndices();
NetworkServer.AddPlayerForConnection(conn, newRoomGameObject);
}
void RecalculateRoomPlayerIndices()

View File

@ -46,6 +46,8 @@ public void Start()
if (room.dontDestroyOnLoad)
DontDestroyOnLoad(gameObject);
room.roomSlots.Add(this);
OnClientEnterRoom();
}
else