From f6a1fbaf1e664417d91a6fe85ba1a6ee7631ccb1 Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Wed, 22 Nov 2023 17:58:06 +1300 Subject: [PATCH] Decal fix 2: Electric Boogaloo (#21831) --- Content.Server/Decals/DecalSystem.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Content.Server/Decals/DecalSystem.cs b/Content.Server/Decals/DecalSystem.cs index 3a3ab0bbcd..0dcb0b31f3 100644 --- a/Content.Server/Decals/DecalSystem.cs +++ b/Content.Server/Decals/DecalSystem.cs @@ -454,9 +454,14 @@ namespace Content.Server.Decals previouslySent.Remove(netGrid); // Was the grid deleted? - if (TryGetEntity(netGrid, out var gridId) && !MapManager.IsGrid(gridId.Value)) + if (TryGetEntity(netGrid, out var gridId) && HasComp(gridId.Value)) { - // If grid was deleted then don't worry about telling the client to delete the chunk. + // no -> add it to the list of stale chunks + staleChunks[netGrid] = oldIndices; + } + else + { + // If the grid was deleted then don't worry about telling the client to delete the chunk. oldIndices.Clear(); _chunkIndexPool.Return(oldIndices); }