mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
Fix floating point tilefire nonsense (#43263)
* Change method call and epsilon * holy guacamole
This commit is contained in:
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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.
|
||||||
|
|||||||
@@ -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"/>.
|
||||||
|
|||||||
Reference in New Issue
Block a user