diff --git a/ksp_plugin/interface_planetarium.cpp b/ksp_plugin/interface_planetarium.cpp index 1ab5a06ac2..b09912c08c 100644 --- a/ksp_plugin/interface_planetarium.cpp +++ b/ksp_plugin/interface_planetarium.cpp @@ -349,7 +349,7 @@ void __cdecl principia__PlanetariumPlotCelestialFutureTrajectory( Instant const prediction_final_time = vessel.prediction()->t_max(); Instant const final_time = vessel.has_flight_plan() - ? std::max(vessel.flight_plan().actual_final_time(), + ? std::max(GetFlightPlan(*plugin, vessel_guid).actual_final_time(), prediction_final_time) : prediction_final_time; auto const& celestial_trajectory = diff --git a/ksp_plugin/plugin.cpp b/ksp_plugin/plugin.cpp index 4445b06f7b..64cdb07871 100644 --- a/ksp_plugin/plugin.cpp +++ b/ksp_plugin/plugin.cpp @@ -971,6 +971,7 @@ void Plugin::ExtendPredictionForFlightPlan(GUID const& vessel_guid) const { // no guarantee that it will be long enough. Presumably the user will keep // increasing the flight plan length and get what they want, ultimately. if (renderer_->HasTargetVessel() && vessel.has_flight_plan()) { + vessel.ReadFlightPlanFromMessage(); auto& target_vessel = renderer_->GetTargetVessel(); if (target_vessel.prediction()->back().time < vessel.flight_plan().actual_final_time()) {