summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/station_cmd.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index fdf858f8c..2925d5a89 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -2555,6 +2555,10 @@ static CommandCost RemoveDock(TileIndex tile, DoCommandFlag flags)
* wander around the world. */
Ship *s;
FOR_ALL_SHIPS(s) {
+ if (s->current_order.IsType(OT_LOADING) && s->tile == docking_location) {
+ s->LeaveStation();
+ }
+
if (s->dest_tile == docking_location) {
s->dest_tile = 0;
s->current_order.Free();