OBT/1.0.11

Fixed a bug that caused the server to stop responding
Fixed an issue in gap.Update that may cause the server to crash
This commit is contained in:
NotAlwaysTrue
2025-12-30 17:41:50 +08:00
committed by GitHub
parent 4c151a4cf1
commit 82d26b5bb8
4 changed files with 22 additions and 7 deletions

View File

@@ -812,7 +812,7 @@ namespace Barotrauma
if (outsideCollisionBlocker == null) { return false; }
if (IsRoomToRoom || Submarine == null || open <= 0.0f || linkedTo.Count == 0 || linkedTo[0] is not Hull)
{
outsideCollisionBlocker.Enabled = false;
outsideCollisionBlocker.AddToDisableQueue();
return false;
}

View File

@@ -686,6 +686,7 @@ namespace Barotrauma
gap.ResetWaterFlowThisFrame();
gap.Update(deltaTime, cam);
});
FarseerPhysics.Dynamics.Body.QueueDisable();
},
// Powered components update
() =>

View File

@@ -245,10 +245,10 @@ namespace Barotrauma
Character.Controlled?.UpdateLocalCursor(cam);
#elif SERVER
Parallel.Invoke(parallelOptions,
() => { if (Level.Loaded != null) Level.Loaded.Update((float)deltaTime, Camera.Instance); },
() => Character.UpdateAll((float)deltaTime, Camera.Instance)
);
// Don't parallize these things here or the server may got stuck but why idk
if (Level.Loaded != null) { Level.Loaded.Update((float)deltaTime, Camera.Instance); }
Character.UpdateAll((float)deltaTime, Camera.Instance);
//StatusEffect.UpdateAll is not thread-safe and must be executed on the main thread
StatusEffect.UpdateAll((float)deltaTime);
@@ -272,9 +272,7 @@ namespace Barotrauma
#if CLIENT
MapEntity.UpdateAll((float)deltaTime, cam, parallelOptions);
#elif SERVER
MapEntity.UpdateAll((float)deltaTime, Camera.Instance, parallelOptions);
#endif
#if CLIENT