From 50a09a830f125ea225b91b6f34bfaf1ac53eaf5f Mon Sep 17 00:00:00 2001 From: Avibah Date: Fri, 24 Apr 2026 14:21:53 -0500 Subject: [PATCH] Fix maps failing to import on systems with less than 4 threads --- scripts/map/MapParser.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/map/MapParser.cs b/scripts/map/MapParser.cs index 1cd5616..f5ac8fc 100644 --- a/scripts/map/MapParser.cs +++ b/scripts/map/MapParser.cs @@ -40,7 +40,7 @@ await Task.Run(() => var maps = new ConcurrentBag(); Callable.From(() => Instance.EmitSignal(SignalName.MapsImportStarted)).CallDeferred(); - Parallel.ForEach(files, new ParallelOptions { MaxDegreeOfParallelism = System.Environment.ProcessorCount / 4 }, file => + Parallel.ForEach(files, new ParallelOptions { MaxDegreeOfParallelism = Math.Max(System.Environment.ProcessorCount / 4, 1) }, file => { try {