Skip to content

Commit

Permalink
Use correct units for fuelFlowGui
Browse files Browse the repository at this point in the history
This sets fuelFlowGui in tons instead of kilograms, as is the case with
stock ModuleEngines.
  • Loading branch information
al2me6 committed Dec 17, 2021
1 parent 1f9859f commit 5483439
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Binary file modified GameData/SolverEngines/Plugins/SolverEngines.dll
Binary file not shown.
8 changes: 4 additions & 4 deletions SolverEngines/EngineModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ virtual public void CalculateEngineParams()
producedThrust = thrustUpperLimit + (producedThrust - thrustUpperLimit) * 0.1d;

// set fuel flow
fuelFlowGui = (float)(fuelFlow * mixtureDensityRecip / ratioSum);
fuelFlowGui = (float)(fuelFlow * 0.001d * mixtureDensityRecip / ratioSum); // Also in tons
if (fuelFlow > 1000d)
{
fuelFlow *= 0.001d;
Expand Down Expand Up @@ -488,7 +488,7 @@ virtual public bool PropellantAvailable()
tmpOutput = 0;
else if (tmpOutput > 1)
tmpOutput = 1;

return tmpOutput;
}
}
Expand Down Expand Up @@ -538,13 +538,13 @@ virtual public void FitEngineIfNecessary()
public override void Activate()
{
base.Activate();

flameout = false;

UpdatePropellantStatus();
lastPropellantFraction = PropellantAvailable() ? 1d : 0d;
}

#endregion

#region Info
Expand Down

0 comments on commit 5483439

Please sign in to comment.