mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
fix: Fix Room Slots for clients (#1439)
* Fix Room Slots for clients * Removed change to ServerChangeScene
This commit is contained in:
parent
cb4be4df78
commit
268753c3bd
@ -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()
|
||||
|
@ -46,6 +46,8 @@ public void Start()
|
||||
if (room.dontDestroyOnLoad)
|
||||
DontDestroyOnLoad(gameObject);
|
||||
|
||||
room.roomSlots.Add(this);
|
||||
|
||||
OnClientEnterRoom();
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user