From 520464e89b2e9b5fdea33be6864d52e2107680cc Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com> Date: Fri, 8 Jul 2022 12:41:59 +0200 Subject: [PATCH] FixVacuum does not replace tile air if there are no adjacent tiles. (#9535) --- .../EntitySystems/AtmosphereSystem.GridAtmosphere.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.GridAtmosphere.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.GridAtmosphere.cs index 69d42186e5..a8c5103b49 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.GridAtmosphere.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.GridAtmosphere.cs @@ -440,6 +440,10 @@ public sealed partial class AtmosphereSystem var adjacent = adjEv.Result!.ToArray(); + // Return early, let's not cause any funny NaNs or needless vacuums. + if (adjacent.Length == 0) + return; + tile.Air = new GasMixture { Volume = GetVolumeForTiles(mapGridComp.Grid, 1), @@ -449,10 +453,6 @@ public sealed partial class AtmosphereSystem tile.MolesArchived = new float[Atmospherics.AdjustedNumberOfGases]; tile.ArchivedCycle = 0; - // Return early, let's not cause any funny NaNs. - if (adjacent.Length == 0) - return; - var ratio = 1f / adjacent.Length; var totalTemperature = 0f;