mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkManager - only ?: (#207)
This commit is contained in:
parent
2ad3aca857
commit
7ec94c79b1
@ -648,16 +648,10 @@ void OnServerAddPlayerInternal(NetworkConnection conn)
|
||||
return;
|
||||
}
|
||||
|
||||
GameObject player;
|
||||
Transform startPos = GetStartPosition();
|
||||
if (startPos != null)
|
||||
{
|
||||
player = Instantiate(playerPrefab, startPos.position, startPos.rotation);
|
||||
}
|
||||
else
|
||||
{
|
||||
player = Instantiate(playerPrefab, Vector3.zero, Quaternion.identity);
|
||||
}
|
||||
GameObject player = startPos != null
|
||||
? Instantiate(playerPrefab, startPos.position, startPos.rotation)
|
||||
: Instantiate(playerPrefab, Vector3.zero, Quaternion.identity);
|
||||
|
||||
NetworkServer.AddPlayerForConnection(conn, player);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user