OBT/1.0.14

Fixed parallelism count issue
Added SingleThreadWorker to handle single-thread related works
Fixed incorrect order when updating gaps
Potentially Fixed #39
This commit is contained in:
NotAlwaysTrue
2026-01-08 12:40:30 +08:00
committed by GitHub
parent f3c22315a1
commit 8bfe8a2c37
5 changed files with 53 additions and 19 deletions
@@ -25,7 +25,7 @@ namespace Barotrauma
private static readonly ParallelOptions parallelOptions = new ParallelOptions
{
MaxDegreeOfParallelism = Environment.ProcessorCount > 0 ? Environment.ProcessorCount * 2 : 16,
MaxDegreeOfParallelism = Math.Max(4, Environment.ProcessorCount - 1)
};
#if CLIENT
@@ -287,6 +287,7 @@ namespace Barotrauma
Ragdoll.UpdateAll((float)deltaTime, cam);
#elif SERVER
Ragdoll.UpdateAll((float)deltaTime, Camera.Instance);
SingleThreadWorker.GlobalWorker.RunActions();
#endif
#if CLIENT
@@ -295,7 +296,7 @@ namespace Barotrauma
sw.Restart();
#endif
foreach(Submarine sub in submarines)
foreach (Submarine sub in submarines)
{
sub.Update((float)deltaTime);
}