From e45548ac74b56e20c61a097b7d098f247642f94c Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto Date: Thu, 25 Mar 2021 14:57:57 +0100 Subject: [PATCH] Optimizes atmos --- Content.Server/Atmos/TileAtmosphere.cs | 2 +- .../GameObjects/Components/Atmos/GridAtmosphereComponent.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Server/Atmos/TileAtmosphere.cs b/Content.Server/Atmos/TileAtmosphere.cs index 8fe78c21f5..6cb166a8d7 100644 --- a/Content.Server/Atmos/TileAtmosphere.cs +++ b/Content.Server/Atmos/TileAtmosphere.cs @@ -640,7 +640,7 @@ namespace Content.Server.Atmos // Can't process a tile without air if (Air == null) { - Excited = false; + _gridAtmosphereComponent.RemoveActiveTile(this); return; } diff --git a/Content.Server/GameObjects/Components/Atmos/GridAtmosphereComponent.cs b/Content.Server/GameObjects/Components/Atmos/GridAtmosphereComponent.cs index 4d998f0552..d1efa72710 100644 --- a/Content.Server/GameObjects/Components/Atmos/GridAtmosphereComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/GridAtmosphereComponent.cs @@ -373,7 +373,7 @@ namespace Content.Server.GameObjects.Components.Atmos [MethodImpl(MethodImplOptions.AggressiveInlining)] public virtual void AddActiveTile(TileAtmosphere tile) { - if (tile?.GridIndex != _gridId) return; + if (tile?.GridIndex != _gridId || tile.Air == null) return; tile.Excited = true; _activeTiles.Add(tile); }