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,17 +1199,16 @@ public static bool SpawnObjects()
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < identities.Length; i++)
|
||||
foreach (NetworkIdentity identity in identities)
|
||||
{
|
||||
if (ValidateSceneObject(identity))
|
||||
{
|
||||
NetworkIdentity identity = identities[i];
|
||||
if (!ValidateSceneObject(identity))
|
||||
continue;
|
||||
|
||||
Spawn(identity.gameObject);
|
||||
|
||||
// these objects are server authority - even if "localPlayerAuthority" is set on them
|
||||
identity.ForceAuthority(true);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user