From d018a27a39c7e4b73336cea157333027c9f99bd9 Mon Sep 17 00:00:00 2001
From: JonBooth78 <jon.booth.uk@gmail.com>
Date: Sun, 28 Jan 2024 22:29:40 +1300
Subject: [PATCH] Fix being able to jump with multiple destinations planned in
 the route

---
 data/pigui/views/map-sector-view.lua | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/data/pigui/views/map-sector-view.lua b/data/pigui/views/map-sector-view.lua
index b134e96e469..50097305ed8 100644
--- a/data/pigui/views/map-sector-view.lua
+++ b/data/pigui/views/map-sector-view.lua
@@ -469,9 +469,9 @@ ui.registerModule("game", { id = 'map-sector-view', draw = function()
 end})
 
 Event.Register("onGameStart", onGameStart)
-Event.Register("onEnterSystem", function()
-	hyperJumpPlanner.onEnterSystem()
-	hyperspaceDetailsCache = {}
+Event.Register("onEnterSystem", function(ship)
+	hyperJumpPlanner.onEnterSystem(ship)
+	if ship:IsPlayer() then hyperspaceDetailsCache = {} end
 end)
 
 -- reset cached data