summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-06-13 10:22:22 +0000
committersmatz <smatz@openttd.org>2009-06-13 10:22:22 +0000
commit62f120b296e3667cba20e4cf5da7ec4d4dd69d5c (patch)
tree8971da3ab1ac87c71cc750fabfd7f2e29e27daab /src
parentfb72e855433f23fea05675848c2ceb37881fb117 (diff)
downloadopenttd-62f120b296e3667cba20e4cf5da7ec4d4dd69d5c.tar.xz
(svn r16571) -Fix [FS#2974](r16322): in some cases, train could be stuck in depot
Diffstat (limited to 'src')
-rw-r--r--src/train_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 87938ad5c..a8b620ec1 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -2436,7 +2436,7 @@ static bool CheckTrainStayInDepot(Train *v)
}
/* We are leaving a depot, but have to go to the exact same one; re-enter */
- if (v->tile == v->dest_tile) {
+ if (v->current_order.IsType(OT_GOTO_DEPOT) && v->tile == v->dest_tile) {
/* We need to have a reservation for this to work. */
if (GetDepotWaypointReservation(v->tile)) return true;
SetDepotWaypointReservation(v->tile, true);