From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Sun, 31 Mar 2024 20:45:40 +0000 (+1300) Subject: Fix GastTileOverlay sending redundant data (#26623) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=d2bee7ec91fef6cb2a1ee9b2aada98ae1ba136f3;p=space-station-14.git Fix GastTileOverlay sending redundant data (#26623) Fix GastTileOverlay not updating properly --- diff --git a/Content.Server/Atmos/EntitySystems/GasTileOverlaySystem.cs b/Content.Server/Atmos/EntitySystems/GasTileOverlaySystem.cs index c42cfd08da..89b9c52078 100644 --- a/Content.Server/Atmos/EntitySystems/GasTileOverlaySystem.cs +++ b/Content.Server/Atmos/EntitySystems/GasTileOverlaySystem.cs @@ -432,14 +432,16 @@ namespace Content.Server.Atmos.EntitySystems if (!overlay.Chunks.TryGetValue(gIndex, out var value)) continue; - if (previousChunks != null && - previousChunks.Contains(gIndex) && - value.LastUpdate > LastSessionUpdate) + // If the chunk was updated since we last sent it, send it again + if (value.LastUpdate > LastSessionUpdate) { + dataToSend.Add(value); continue; } - dataToSend.Add(value); + // Always send it if we didn't previously send it + if (previousChunks == null || !previousChunks.Contains(gIndex)) + dataToSend.Add(value); } previouslySent[netGrid] = gridChunks;