Skip to content

Commit

Permalink
Fix ion engines having NaN thrust. Close #320
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanKell committed Nov 8, 2023
1 parent b9eb40b commit ed05234
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/Engines/ModuleEngineConfigs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1200,10 +1200,12 @@ virtual public void DoConfig(ConfigNode cfg)

// Now update the cfg from what we did.
// thrust updates
// These previously used the format "0.0000" but that sets thrust to 0 for engines with < that in kN
// so we'll just use default.
if (configMaxThrust >= 0f)
cfg.SetValue(thrustRating, configMaxThrust.ToString("0.0000"), true);
cfg.SetValue(thrustRating, configMaxThrust, true);
if (configMinThrust >= 0f)
cfg.SetValue("minThrust", configMinThrust.ToString("0.0000"), true); // will be ignored by RCS, so what.
cfg.SetValue("minThrust", configMinThrust, true); // will be ignored by RCS, so what.

// heat update
if (configHeat >= 0f)
Expand Down

0 comments on commit ed05234

Please sign in to comment.