Closed allista closed 4 years ago
I also just ran into this breaking some code I wrote for MechJeb.
NathanKell wrote this code but has been pretty inactive lately. I'll try to understand why this was done this way if I have time soon.
According to the comments, that whole bit was a dirty hack to get around ModuleEngineFX.CanStart() not being virtual ... except that currently it IS so what needs to happen is that an override CanStart method needs to be written which has a check that flameout is true (and returns that if necessary) and remove the two lines that tamper with CLAMP.
This will be addressed in the update for KSP 1.6
FYI:
Here's the line I'm referencing to.
ThrottleControlledAvionics uses the code from ModuleEngines.ModifyFlow() to calculate the fuel flow modifier. This hack effectively sets the modifier to MaxValue as well, which causes the calculated thrust to be Infinity.
Right now I've added a workaround: the CLAMP is used only when it is less than 1. But maybe you could handle flameouts in a less radical way that does not generate such unexpected values? :) Could setting CLAMP to 1 do the same trick?