Fixed 2 issues

Fixed an issue causing gap.update crashes the game(engine issue)
Fixed an potential issue that on MacOS we cannot get core count and cause MaxDegreeOfParallelism will be set to 0. Now if we cant get that number we simply use a fixed 16 instead
This commit is contained in:
NotAlwaysTrue
2025-12-29 16:28:34 +08:00
parent 046483b9da
commit 190c98d8f2
2 changed files with 12 additions and 15 deletions
@@ -25,7 +25,7 @@ namespace Barotrauma
private static readonly ParallelOptions parallelOptions = new ParallelOptions
{
MaxDegreeOfParallelism = Environment.ProcessorCount * 2,
MaxDegreeOfParallelism = Environment.ProcessorCount > 0 ? Environment.ProcessorCount * 2 : 16,
};
#if CLIENT