Skip to content

Commit 8c747a3

Browse files
committed
Merge branch 'master' of https://github.com/MidLevel/MLAPI
2 parents 8aff816 + c793f17 commit 8c747a3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

MLAPI/Core/NetworkedObject.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,9 @@ internal List<NetworkedBehaviour> childNetworkedBehaviours
515515
private static int _lastProcessedObject = 0;
516516
internal static void NetworkedBehaviourUpdate()
517517
{
518+
if (SpawnManager.SpawnedObjectsList.Count == 0)
519+
return;
520+
518521
int amountToProcess = NetworkingManager.Singleton.NetworkConfig.MaxObjectUpdatesPerTick <= 0 ? SpawnManager.SpawnedObjectsList.Count : Mathf.Max(NetworkingManager.Singleton.NetworkConfig.MaxObjectUpdatesPerTick, SpawnManager.SpawnedObjectsList.Count);
519522

520523
for (int i = 0; i < amountToProcess; i++)

0 commit comments

Comments
 (0)