From 54c5bac8f79e5eda79b901e69deecfeaa69fc2b6 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Wed, 6 Mar 2019 18:27:54 +0000 Subject: [PATCH] Fix #7334: Ship lost after crossing bridge due to path cache not being consumed while on final bridge end. --- src/ship_cmd.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index c2ce5adc95599..786375689bbb2 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -766,6 +766,10 @@ static void ShipController(Ship *v) if ((v->vehstatus & VS_HIDDEN) == 0) v->Vehicle::UpdateViewport(true); return; } + + /* Ship is back on the bridge head, we need to comsume its path + * cache entry here as we didn't have to choose a ship track. */ + if (!v->path.empty()) v->path.pop_front(); } /* update image of ship, as well as delta XY */