Slight explosively depressurize cleanup.

This commit is contained in:
Vera Aguilera Puerto
2021-09-06 17:30:38 +02:00
parent 9f4ea1e5a9
commit 68a78e94b7

View File

@@ -376,12 +376,7 @@ namespace Content.Server.Atmos.EntitySystems
otherTile.MonstermosInfo.LastCycle = cycleNum; otherTile.MonstermosInfo.LastCycle = cycleNum;
otherTile.MonstermosInfo.CurrentTransferDirection = AtmosDirection.Invalid; otherTile.MonstermosInfo.CurrentTransferDirection = AtmosDirection.Invalid;
// Tiles in the _depressurizeTiles array cannot have null air. // Tiles in the _depressurizeTiles array cannot have null air.
if (otherTile.Air!.Immutable) if (!otherTile.Air!.Immutable)
{
_depressurizeSpaceTiles[spaceTileCount++] = otherTile;
otherTile.PressureSpecificTarget = otherTile;
}
else
{ {
for (var j = 0; j < Atmospherics.Directions; j++) for (var j = 0; j < Atmospherics.Directions; j++)
{ {
@@ -395,14 +390,21 @@ namespace Content.Server.Atmos.EntitySystems
// The firelocks might have closed on us. // The firelocks might have closed on us.
if (!otherTile.AdjacentBits.IsFlagSet(direction)) continue; if (!otherTile.AdjacentBits.IsFlagSet(direction)) continue;
otherTile2.MonstermosInfo = new MonstermosInfo {LastQueueCycle = queueCycle}; otherTile2.MonstermosInfo = new MonstermosInfo { LastQueueCycle = queueCycle };
_depressurizeTiles[tileCount++] = otherTile2; _depressurizeTiles[tileCount++] = otherTile2;
if (tileCount >= limit) break; if (tileCount >= limit) break;
} }
} }
else
{
_depressurizeSpaceTiles[spaceTileCount++] = otherTile;
otherTile.PressureSpecificTarget = otherTile;
}
if (tileCount >= limit || spaceTileCount >= limit) if (tileCount < limit && spaceTileCount < limit)
break; continue;
break;
} }
var queueCycleSlow = ++gridAtmosphere.EqualizationQueueCycleControl; var queueCycleSlow = ++gridAtmosphere.EqualizationQueueCycleControl;