Skip to content

Commit a1caa92

Browse files
committed
actually fix warp to next
1 parent 2c00b37 commit a1caa92

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

RasterPropMonitor/Core/RPMCEvaluators.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ internal NumericVariableEvaluator GetNumericEvaluator(string input, out Variable
945945
case "MNODEBURNTIMESECS":
946946
return (RPMVesselComputer comp) =>
947947
{
948-
if (node != null && comp.totalLimitedMaximumThrust > 0 && comp.actualAverageIsp > 0.0f)
948+
if (node != null)
949949
{
950950
return comp.actualAverageIsp * (1.0f - Math.Exp(-node.GetBurnVector(vessel.orbit).magnitude / comp.actualAverageIsp / RPMGlobals.gee)) / (comp.totalLimitedMaximumThrust / (comp.totalShipWetMass * RPMGlobals.gee));
951951
}

RasterPropMonitor/Handlers/JSIInternalRPMButtons.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,8 @@ double GetNextWarpEventTime()
13981398

13991399
if (vessel.patchedConicSolver != null && vessel.patchedConicSolver.maneuverNodes.Count > 0)
14001400
{
1401-
targetUT = Planetarium.GetUniversalTime() + vessel.patchedConicSolver.maneuverNodes[0].startBurnIn - GameSettings.WARP_TO_MANNODE_MARGIN;
1401+
double halfBurnDuration = GetBurnDuration((float)vessel.patchedConicSolver.maneuverNodes[0].DeltaV.magnitude * 0.5f);
1402+
targetUT = vessel.patchedConicSolver.maneuverNodes[0].UT - halfBurnDuration - GameSettings.WARP_TO_MANNODE_MARGIN;
14021403
}
14031404
else if (vessel.orbit.nextPatch != null && vessel.orbit.nextPatch.activePatch)
14041405
{

0 commit comments

Comments
 (0)