mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
fix ClientGameStateManager bug (#3727)
This commit is contained in:
@@ -462,6 +462,7 @@ namespace Robust.Client.GameStates
|
||||
|
||||
foreach (var entity in system.DirtyEntities)
|
||||
{
|
||||
DebugTools.Assert(toRemove.Count == 0);
|
||||
// Check log level first to avoid the string alloc.
|
||||
if (_sawmill.Level <= LogLevel.Debug)
|
||||
_sawmill.Debug($"Entity {entity} was made dirty.");
|
||||
@@ -521,6 +522,7 @@ namespace Robust.Client.GameStates
|
||||
{
|
||||
_entities.RemoveComponent(entity, comp);
|
||||
}
|
||||
toRemove.Clear();
|
||||
|
||||
// Re-add predicted removals
|
||||
if (system.RemovedComponents.TryGetValue(entity, out var netIds))
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace Robust.Shared.Utility
|
||||
public struct RemQueue<T>
|
||||
{
|
||||
public List<T>? List;
|
||||
public int Count => List?.Count ?? 0;
|
||||
|
||||
public void Add(T t)
|
||||
{
|
||||
@@ -25,6 +26,11 @@ namespace Robust.Shared.Utility
|
||||
return new(List);
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
List?.Clear();
|
||||
}
|
||||
|
||||
public struct Enumerator : IEnumerator<T>
|
||||
{
|
||||
private readonly bool _filled;
|
||||
|
||||
Reference in New Issue
Block a user