Fix error when trying to get a state with deleted grid entity ids in ExplosionVisualsComponent (#21743)
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using Content.Shared.Atmos;
|
using Content.Shared.Atmos;
|
||||||
|
using Content.Shared.Explosion;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Map.Components;
|
using Robust.Shared.Map.Components;
|
||||||
|
|
||||||
@@ -37,6 +38,13 @@ public sealed partial class ExplosionSystem : EntitySystem
|
|||||||
{
|
{
|
||||||
_airtightMap.Remove(ev.EntityUid);
|
_airtightMap.Remove(ev.EntityUid);
|
||||||
_gridEdges.Remove(ev.EntityUid);
|
_gridEdges.Remove(ev.EntityUid);
|
||||||
|
|
||||||
|
// this should be a small enough set that iterating all of them is fine
|
||||||
|
var query = EntityQueryEnumerator<ExplosionVisualsComponent>();
|
||||||
|
while (query.MoveNext(out var visuals))
|
||||||
|
{
|
||||||
|
visuals.Tiles.Remove(ev.EntityUid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user