Fix PredictedQueueDeleteEntity mispredicts (#6260)

* Fix PredictedQueueDeleteEntity

* typo

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
Leon Friedrich
2025-10-28 01:04:12 +13:00
committed by GitHub
parent c9009342b6
commit bb4c4ed302
4 changed files with 42 additions and 30 deletions

View File

@@ -288,12 +288,7 @@ namespace Robust.Shared.GameObjects
using (histogram?.WithLabels("QueuedDeletion").NewTimer())
using (_prof.Group("QueueDel"))
{
while (QueuedDeletions.TryDequeue(out var uid))
{
DeleteEntity(uid);
}
QueuedDeletionsSet.Clear();
ProcessQueueudDeletions();
}
using (histogram?.WithLabels("ComponentCull").NewTimer())
@@ -303,6 +298,16 @@ namespace Robust.Shared.GameObjects
}
}
internal virtual void ProcessQueueudDeletions()
{
while (QueuedDeletions.TryDequeue(out var uid))
{
DeleteEntity(uid);
}
QueuedDeletionsSet.Clear();
}
public virtual void FrameUpdate(float frameTime)
{
_entitySystemManager.FrameUpdate(frameTime);