Code cleanup

This commit is contained in:
Chris Langsenkamp 2020-01-19 23:34:53 -05:00
parent 522655d1ad
commit eef97e9a52

View File

@ -278,9 +278,7 @@ public override void OnServerAddPlayer(NetworkConnection conn)
GameObject newRoomGameObject = OnRoomServerCreateRoomPlayer(conn);
if (newRoomGameObject == null)
newRoomGameObject = (GameObject)Instantiate(roomPlayerPrefab.gameObject, Vector3.zero, Quaternion.identity);
NetworkRoomPlayer newRoomPlayer = newRoomGameObject.GetComponent<NetworkRoomPlayer>();
newRoomGameObject = Instantiate(roomPlayerPrefab.gameObject, Vector3.zero, Quaternion.identity);
NetworkServer.AddPlayerForConnection(conn, newRoomGameObject);