summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Nelson <peter1138@openttd.org>2018-05-18 09:04:39 +0100
committerCharles Pigott <charlespigott@googlemail.com>2019-01-14 19:57:07 +0000
commit6a38a3f5df177cdf85bd64b1b873f524d5b0629c (patch)
tree506eb06bbf7a6407b16feda1db13d66bf87c2399 /src
parent29b6b74ee19e6df4ff71b592f27ccbfeb0f9c2f3 (diff)
downloadopenttd-6a38a3f5df177cdf85bd64b1b873f524d5b0629c.tar.xz
Change: Don't leave ship depot with no orders.
Diffstat (limited to 'src')
-rw-r--r--src/ship_cmd.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp
index e606afc0c..16b93e48b 100644
--- a/src/ship_cmd.cpp
+++ b/src/ship_cmd.cpp
@@ -330,6 +330,9 @@ static bool CheckShipLeaveDepot(Ship *v)
return true;
}
+ /* Don't leave depot if no destination set */
+ if (v->dest_tile == 0) return true;
+
TileIndex tile = v->tile;
Axis axis = GetShipDepotAxis(tile);