From 68a78e94b764f461c3570181ce174d8573943113 Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto Date: Mon, 6 Sep 2021 17:30:38 +0200 Subject: [PATCH] Slight explosively depressurize cleanup. --- .../AtmosphereSystem.Monstermos.cs | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Monstermos.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Monstermos.cs index 3a93cd26af..4c474f4fc1 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Monstermos.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Monstermos.cs @@ -376,12 +376,7 @@ namespace Content.Server.Atmos.EntitySystems otherTile.MonstermosInfo.LastCycle = cycleNum; otherTile.MonstermosInfo.CurrentTransferDirection = AtmosDirection.Invalid; // Tiles in the _depressurizeTiles array cannot have null air. - if (otherTile.Air!.Immutable) - { - _depressurizeSpaceTiles[spaceTileCount++] = otherTile; - otherTile.PressureSpecificTarget = otherTile; - } - else + if (!otherTile.Air!.Immutable) { for (var j = 0; j < Atmospherics.Directions; j++) { @@ -395,14 +390,21 @@ namespace Content.Server.Atmos.EntitySystems // The firelocks might have closed on us. if (!otherTile.AdjacentBits.IsFlagSet(direction)) continue; - otherTile2.MonstermosInfo = new MonstermosInfo {LastQueueCycle = queueCycle}; + otherTile2.MonstermosInfo = new MonstermosInfo { LastQueueCycle = queueCycle }; _depressurizeTiles[tileCount++] = otherTile2; if (tileCount >= limit) break; } } + else + { + _depressurizeSpaceTiles[spaceTileCount++] = otherTile; + otherTile.PressureSpecificTarget = otherTile; + } - if (tileCount >= limit || spaceTileCount >= limit) - break; + if (tileCount < limit && spaceTileCount < limit) + continue; + + break; } var queueCycleSlow = ++gridAtmosphere.EqualizationQueueCycleControl;