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)) if (!IsMixtureOxidizer(tile.Air))
return; return;
var isFlammable = IsMixtureIgnitable(tile.Air); var isFlammable = IsMixtureFuel(tile.Air);
if (tile.Hotspot.Valid) if (tile.Hotspot.Valid)
{ {

View File

@ -22,7 +22,7 @@ namespace Content.Shared.Atmos
/// <summary> /// <summary>
/// Global Atmospherics epsilon. Used for all general floating-point comparisons. /// Global Atmospherics epsilon. Used for all general floating-point comparisons.
/// </summary> /// </summary>
public const float Epsilon = 0.001f; public const float Epsilon = 0.5f;
/// <summary> /// <summary>
/// Maximum external pressure (in kPA) a gas miner will, by default, output to. /// 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> /// considered ignitable, for both oxidizer and fuel.</param>
/// <returns>True if the <see cref="GasMixture"/> is ignitable, otherwise, false.</returns> /// <returns>True if the <see cref="GasMixture"/> is ignitable, otherwise, false.</returns>
[PublicAPI] [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); return IsMixtureFuel(mixture, epsilon) && IsMixtureOxidizer(mixture, epsilon);
} }
@ -128,7 +128,7 @@ public abstract partial class SharedAtmosphereSystem
/// is considered fuel.</param> /// is considered fuel.</param>
/// <returns>True if the <see cref="GasMixture"/> is fuel, otherwise, false.</returns> /// <returns>True if the <see cref="GasMixture"/> is fuel, otherwise, false.</returns>
[PublicAPI] [PublicAPI]
public abstract bool IsMixtureFuel(GasMixture mixture, float epsilon = 0.001f); public abstract bool IsMixtureFuel(GasMixture mixture, float epsilon = Atmospherics.Epsilon);
/// <summary> /// <summary>
/// Determines if a <see cref="GasMixture"/> has oxidizer gases in it or not. /// 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> /// is considered an oxidizer.</param>
/// <returns>True if the <see cref="GasMixture"/> is an oxidizer, otherwise, false.</returns> /// <returns>True if the <see cref="GasMixture"/> is an oxidizer, otherwise, false.</returns>
[PublicAPI] [PublicAPI]
public abstract bool IsMixtureOxidizer(GasMixture mixture, float epsilon = 0.001f); public abstract bool IsMixtureOxidizer(GasMixture mixture, float epsilon = Atmospherics.Epsilon);
/// <summary> /// <summary>
/// Calculates the heat capacity for a <see cref="GasMixture"/>. /// Calculates the heat capacity for a <see cref="GasMixture"/>.