mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkServer.SpawnObjects: use foreach in second loop too
This commit is contained in:
parent
1418fb66b7
commit
de59e32ce3
@ -1199,16 +1199,15 @@ public static bool SpawnObjects()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < identities.Length; i++)
|
foreach (NetworkIdentity identity in identities)
|
||||||
{
|
{
|
||||||
NetworkIdentity identity = identities[i];
|
if (ValidateSceneObject(identity))
|
||||||
if (!ValidateSceneObject(identity))
|
{
|
||||||
continue;
|
Spawn(identity.gameObject);
|
||||||
|
|
||||||
Spawn(identity.gameObject);
|
// these objects are server authority - even if "localPlayerAuthority" is set on them
|
||||||
|
identity.ForceAuthority(true);
|
||||||
// these objects are server authority - even if "localPlayerAuthority" is set on them
|
}
|
||||||
identity.ForceAuthority(true);
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user