From 272a992011f4ff8af71efce99d87a2bc0ef67ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Aguilera=20Puerto?= Date: Fri, 11 Sep 2020 12:54:42 +0200 Subject: [PATCH] Redundant adjacent update --- .../GameObjects/Components/Atmos/GridAtmosphereComponent.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Server/GameObjects/Components/Atmos/GridAtmosphereComponent.cs b/Content.Server/GameObjects/Components/Atmos/GridAtmosphereComponent.cs index 11f2e91a78..aa2b3e859f 100644 --- a/Content.Server/GameObjects/Components/Atmos/GridAtmosphereComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/GridAtmosphereComponent.cs @@ -185,6 +185,8 @@ namespace Content.Server.GameObjects.Components.Atmos { if(!Tiles.ContainsKey(tile.GridIndices)) Tiles.Add(tile.GridIndices, new TileAtmosphere(this, tile.GridIndex, tile.GridIndices, new GasMixture(GetVolumeForCells(1)){Temperature = Atmospherics.T20C})); + + Invalidate(tile.GridIndices); } foreach (var (_, tile) in Tiles.ToArray()) @@ -246,7 +248,6 @@ namespace Content.Server.GameObjects.Components.Atmos var otherIndices = indices.Offset(direction.ToDirection()); var otherTile = GetTile(otherIndices); AddActiveTile(otherTile); - otherTile?.UpdateAdjacent(direction.GetOpposite()); } }