diff src/train_cmd.cpp @ 12155:884d20bcc977 draft

(svn r16571) -Fix [FS#2974](r16322): in some cases, train could be stuck in depot
author smatz <smatz@openttd.org>
date Sat, 13 Jun 2009 10:22:22 +0000
parents b3c5a6c9146a
children d1a94177c6ec
line wrap: on
line diff
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -2436,7 +2436,7 @@
 	}
 
 	/* 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);