FixVacuum does not replace tile air if there are no adjacent tiles. (#9535)
This commit is contained in:
committed by
GitHub
parent
07c622429a
commit
520464e89b
@@ -440,6 +440,10 @@ public sealed partial class AtmosphereSystem
|
|||||||
|
|
||||||
var adjacent = adjEv.Result!.ToArray();
|
var adjacent = adjEv.Result!.ToArray();
|
||||||
|
|
||||||
|
// Return early, let's not cause any funny NaNs or needless vacuums.
|
||||||
|
if (adjacent.Length == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
tile.Air = new GasMixture
|
tile.Air = new GasMixture
|
||||||
{
|
{
|
||||||
Volume = GetVolumeForTiles(mapGridComp.Grid, 1),
|
Volume = GetVolumeForTiles(mapGridComp.Grid, 1),
|
||||||
@@ -449,10 +453,6 @@ public sealed partial class AtmosphereSystem
|
|||||||
tile.MolesArchived = new float[Atmospherics.AdjustedNumberOfGases];
|
tile.MolesArchived = new float[Atmospherics.AdjustedNumberOfGases];
|
||||||
tile.ArchivedCycle = 0;
|
tile.ArchivedCycle = 0;
|
||||||
|
|
||||||
// Return early, let's not cause any funny NaNs.
|
|
||||||
if (adjacent.Length == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
var ratio = 1f / adjacent.Length;
|
var ratio = 1f / adjacent.Length;
|
||||||
var totalTemperature = 0f;
|
var totalTemperature = 0f;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user