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
@@ -29,6 +29,7 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
@@ -349,6 +350,21 @@ namespace FarseerPhysics.Dynamics
}
}
private static ConcurrentQueue<Body> DisableQueue = new ConcurrentQueue<Body>();
public static void QueueDisable()
{
while (DisableQueue.TryDequeue(out var pendingbody))
{
pendingbody.Enabled = false;
}
}
public void AddToDisableQueue()
{
DisableQueue.Enqueue(this);
}
/// <summary>
/// Create all proxies.
/// </summary>