NetworkServer.SpawnObject: add explanation

This commit is contained in:
vis2k 2023-01-28 12:34:38 +09:00
parent 547da088b1
commit bb6c0de495

View File

@ -1385,6 +1385,8 @@ static void SpawnObject(GameObject obj, NetworkConnection ownerConnection)
if (!identity.isServer && identity.netId == 0)
{
// configure NetworkIdentity
// this may be called in host mode, so we need to initialize
// isLocalPlayer/isClient flags too.
identity.isLocalPlayer = NetworkClient.localPlayer == identity;
identity.isClient = NetworkClient.active;
identity.isServer = true;