Skip to content

Commit

Permalink
Right thrust calculation for ModuleEnginesFX Parts
Browse files Browse the repository at this point in the history
Jaidans fix with the right thrustlimitter calculation (#62)
  • Loading branch information
Peppie84 committed Jun 1, 2014
1 parent bf834bd commit e073bfa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/RemoteTech2/FlightComputer/FlightCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ public static double GetTotalThrust(Vessel v)
if (!pm.EngineIgnited) continue;
thrust += pm.maxThrust;
}
foreach (var pm in v.parts.SelectMany(p => p.FindModulesImplementing<ModuleEnginesFX>()))
{
if (!pm.EngineIgnited) continue;
thrust += (double) pm.maxThrust * (pm.thrustPercentage * 0.01);
}
return thrust;
}
}
Expand Down

0 comments on commit e073bfa

Please sign in to comment.