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:
@@ -281,6 +281,17 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Compares two TileAtmospheres to see if they are within acceptable ranges for group processing to be enabled.
|
||||
/// </summary>
|
||||
public GasCompareResult CompareExchange(TileAtmosphere sample, TileAtmosphere otherSample)
|
||||
{
|
||||
if (sample.AirArchived == null || otherSample.AirArchived == null)
|
||||
return GasCompareResult.NoExchange;
|
||||
|
||||
return CompareExchange(sample.AirArchived, otherSample.AirArchived);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Compares two gas mixtures to see if they are within acceptable ranges for group processing to be enabled.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user