From d1fdc12de9e1fa892f427af40b39d7831d62af3f Mon Sep 17 00:00:00 2001 From: InvalidArgument3 Date: Sat, 26 Oct 2024 20:44:36 -0500 Subject: [PATCH] Update AsteroidSpawner.cs --- .../Data/Scripts/DynamicAsteroids/AsteroidSpawner.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dynamic Asteroids/Data/Scripts/DynamicAsteroids/AsteroidSpawner.cs b/Dynamic Asteroids/Data/Scripts/DynamicAsteroids/AsteroidSpawner.cs index c18fea3..9433c92 100644 --- a/Dynamic Asteroids/Data/Scripts/DynamicAsteroids/AsteroidSpawner.cs +++ b/Dynamic Asteroids/Data/Scripts/DynamicAsteroids/AsteroidSpawner.cs @@ -98,7 +98,7 @@ public class AsteroidSpawner { private const int UpdatesPerTick = 50;// update rate of the roids private ConcurrentQueue _pendingRemovals = new ConcurrentQueue(); - private const int REMOVAL_BATCH_SIZE = 50; + private const int REMOVAL_BATCH_SIZE = 10; private const double REMOVAL_BATCH_INTERVAL = 1.0; // seconds private DateTime _lastRemovalBatch = DateTime.MinValue; @@ -822,7 +822,7 @@ private void UpdateAsteroids(List zones) { } // Process removals in batches - const int REMOVAL_BATCH_SIZE = 50; + const int REMOVAL_BATCH_SIZE = 10; for (int i = 0; i < asteroidsToRemove.Count; i += REMOVAL_BATCH_SIZE) { var batch = asteroidsToRemove.Skip(i).Take(REMOVAL_BATCH_SIZE); foreach (var asteroid in batch) {