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:
@@ -812,7 +812,11 @@ namespace Barotrauma
|
||||
if (outsideCollisionBlocker == null) { return false; }
|
||||
if (IsRoomToRoom || Submarine == null || open <= 0.0f || linkedTo.Count == 0 || linkedTo[0] is not Hull)
|
||||
{
|
||||
outsideCollisionBlocker.AddToDisableQueue();
|
||||
SingleThreadWorker.GlobalWorker.AddAction(() =>
|
||||
{
|
||||
outsideCollisionBlocker.Enabled = false;
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -681,12 +681,12 @@ namespace Barotrauma
|
||||
{
|
||||
// if crashed, go ask the god damn physics engine :(
|
||||
var shuffledGaps = gapList.OrderBy(g => Rand.Int(int.MaxValue)).ToList();
|
||||
Parallel.ForEach(gapList, parallelOptions, gap =>
|
||||
Parallel.ForEach(shuffledGaps, parallelOptions, gap =>
|
||||
{
|
||||
gap.ResetWaterFlowThisFrame();
|
||||
gap.Update(deltaTime, cam);
|
||||
});
|
||||
FarseerPhysics.Dynamics.Body.QueueDisable();
|
||||
SingleThreadWorker.GlobalWorker.RunActions();
|
||||
},
|
||||
// Powered components update
|
||||
() =>
|
||||
|
||||
Reference in New Issue
Block a user