Fix floating point tilefire nonsense (#43263)

* Change method call and epsilon

* holy guacamole
This commit is contained in:
ArtisticRoomba 2026-03-16 18:26:14 -07:00 committed by Coryler
parent a1b69294b2
commit d1c86ee235
3 changed files with 5 additions and 5 deletions

View File

@ -204,7 +204,7 @@ public sealed partial class AtmosphereSystem
if (!IsMixtureOxidizer(tile.Air))
return;
var isFlammable = IsMixtureIgnitable(tile.Air);
var isFlammable = IsMixtureFuel(tile.Air);
if (tile.Hotspot.Valid)
{

View File

@ -22,7 +22,7 @@ namespace Content.Shared.Atmos
/// <summary>
/// Global Atmospherics epsilon. Used for all general floating-point comparisons.
/// </summary>
public const float Epsilon = 0.001f;
public const float Epsilon = 0.5f;
/// <summary>
/// Maximum external pressure (in kPA) a gas miner will, by default, output to.

View File

@ -115,7 +115,7 @@ public abstract partial class SharedAtmosphereSystem
/// considered ignitable, for both oxidizer and fuel.</param>
/// <returns>True if the <see cref="GasMixture"/> is ignitable, otherwise, false.</returns>
[PublicAPI]
public bool IsMixtureIgnitable(GasMixture mixture, float epsilon = 0.001f)
public bool IsMixtureIgnitable(GasMixture mixture, float epsilon = Atmospherics.Epsilon)
{
return IsMixtureFuel(mixture, epsilon) && IsMixtureOxidizer(mixture, epsilon);
}
@ -128,7 +128,7 @@ public abstract partial class SharedAtmosphereSystem
/// is considered fuel.</param>
/// <returns>True if the <see cref="GasMixture"/> is fuel, otherwise, false.</returns>
[PublicAPI]
public abstract bool IsMixtureFuel(GasMixture mixture, float epsilon = 0.001f);
public abstract bool IsMixtureFuel(GasMixture mixture, float epsilon = Atmospherics.Epsilon);
/// <summary>
/// Determines if a <see cref="GasMixture"/> has oxidizer gases in it or not.
@ -138,7 +138,7 @@ public abstract partial class SharedAtmosphereSystem
/// is considered an oxidizer.</param>
/// <returns>True if the <see cref="GasMixture"/> is an oxidizer, otherwise, false.</returns>
[PublicAPI]
public abstract bool IsMixtureOxidizer(GasMixture mixture, float epsilon = 0.001f);
public abstract bool IsMixtureOxidizer(GasMixture mixture, float epsilon = Atmospherics.Epsilon);
/// <summary>
/// Calculates the heat capacity for a <see cref="GasMixture"/>.