summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2019-03-06 18:27:54 +0000
committerMichael Lutz <michi@icosahedron.de>2019-03-08 16:51:23 +0100
commita69eb5f516963f6f7a39f90d959cdff61e8e70b2 (patch)
treef3eb555057e38dfd152c80bc389ca0845d661cbc /src
parent1ad8321fff166c2e620ada7a6fc3239332e64777 (diff)
downloadopenttd-a69eb5f516963f6f7a39f90d959cdff61e8e70b2.tar.xz
Fix #7334: Ship lost after crossing bridge due to path cache not being consumed while on final bridge end.
Diffstat (limited to 'src')
-rw-r--r--src/ship_cmd.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp
index 0f3f7b74d..6d6f8415c 100644
--- a/src/ship_cmd.cpp
+++ b/src/ship_cmd.cpp
@@ -759,6 +759,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 */