From: DrSmugleaf Date: Sat, 18 Nov 2023 19:02:45 +0000 (-0800) Subject: Fix error when trying to get a state with deleted grid entity ids in ExplosionVisuals... X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=86c0a73c09bb835dc2db053718e911647d3b62a9;p=space-station-14.git Fix error when trying to get a state with deleted grid entity ids in ExplosionVisualsComponent (#21743) --- diff --git a/Content.Server/Explosion/EntitySystems/ExplosionSystem.GridMap.cs b/Content.Server/Explosion/EntitySystems/ExplosionSystem.GridMap.cs index 34028ab435..799489d7b4 100644 --- a/Content.Server/Explosion/EntitySystems/ExplosionSystem.GridMap.cs +++ b/Content.Server/Explosion/EntitySystems/ExplosionSystem.GridMap.cs @@ -1,5 +1,6 @@ using System.Numerics; using Content.Shared.Atmos; +using Content.Shared.Explosion; using Robust.Shared.Map; using Robust.Shared.Map.Components; @@ -37,6 +38,13 @@ public sealed partial class ExplosionSystem : EntitySystem { _airtightMap.Remove(ev.EntityUid); _gridEdges.Remove(ev.EntityUid); + + // this should be a small enough set that iterating all of them is fine + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var visuals)) + { + visuals.Tiles.Remove(ev.EntityUid); + } } ///