]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Decal fix 2: Electric Boogaloo (#21831)
authorLeon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Wed, 22 Nov 2023 04:58:06 +0000 (17:58 +1300)
committerGitHub <noreply@github.com>
Wed, 22 Nov 2023 04:58:06 +0000 (15:58 +1100)
Content.Server/Decals/DecalSystem.cs

index 3a3ab0bbcd8e0a8d1fbb67bea00146fb1b70d3b1..0dcb0b31f382082510973d3a4f100af899d6f12c 100644 (file)
@@ -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<MapGridComponent>(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);
                     }