Fixes that annoying atmos zero pressure bug I've constantly been pinged and nagged about for like the past few days.

This commit is contained in:
Vera Aguilera Puerto
2021-11-11 16:15:14 +01:00
parent 7b4da352df
commit 1b01247c5f
4 changed files with 21 additions and 10 deletions

View File

@@ -988,6 +988,7 @@ namespace Content.Server.Atmos.EntitySystems
private void UpdateAdjacent(IMapGrid mapGrid, GridAtmosphereComponent gridAtmosphere, TileAtmosphere tileAtmosphere)
{
tileAtmosphere.AdjacentBits = AtmosDirection.Invalid;
tileAtmosphere.BlockedAirflow = GetBlockedDirections(mapGrid, tileAtmosphere.GridIndices);
for (var i = 0; i < Atmospherics.Directions; i++)
{
@@ -1006,6 +1007,9 @@ namespace Content.Server.Atmos.EntitySystems
tileAtmosphere.AdjacentBits |= direction;
}
}
if (!tileAtmosphere.AdjacentBits.IsFlagSet(tileAtmosphere.MonstermosInfo.CurrentTransferDirection))
tileAtmosphere.MonstermosInfo.CurrentTransferDirection = AtmosDirection.Invalid;
}
/// <summary>
@@ -1071,6 +1075,9 @@ namespace Content.Server.Atmos.EntitySystems
{
tile.AdjacentBits &= ~direction;
}
if (!tile.AdjacentBits.IsFlagSet(tile.MonstermosInfo.CurrentTransferDirection))
tile.MonstermosInfo.CurrentTransferDirection = AtmosDirection.Invalid;
}
#endregion