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