Use archived gas mixture in gas exchange comparison (#32088)

The comparison for doing gas exchange used current and not archived
moles. This could lead to update order-dependent gas spreading effects.

To fix this, convert TileAtmosphere's MolesArchived and
TemperatureArchived to a AirArchived, and use that in the comparison
method.

---------

Co-authored-by: PraxisMapper <praxismapper@gmail.com>
Co-authored-by: Kevin Zheng <kevinz5000@gmail.com>
This commit is contained in:
drakewill-CRL
2024-09-30 01:14:07 -04:00
committed by GitHub
parent dd15a6862c
commit 7cf04dcb20
7 changed files with 47 additions and 27 deletions

View File

@@ -355,7 +355,7 @@ namespace Content.Server.Atmos.EntitySystems
continue;
DebugTools.Assert(otherTile2.AdjacentBits.IsFlagSet(direction.GetOpposite()));
if (otherTile2.Air != null && CompareExchange(otherTile2.Air, tile.Air) == GasCompareResult.NoExchange)
if (otherTile2.Air != null && CompareExchange(otherTile2, tile) == GasCompareResult.NoExchange)
continue;
AddActiveTile(gridAtmosphere, otherTile2);