mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r16571) -Fix [FS#2974](r16322): in some cases, train could be stuck in depot
This commit is contained in:
parent
15f80f4cfe
commit
632a3191f6
@ -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 */
|
/* 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. */
|
/* We need to have a reservation for this to work. */
|
||||||
if (GetDepotWaypointReservation(v->tile)) return true;
|
if (GetDepotWaypointReservation(v->tile)) return true;
|
||||||
SetDepotWaypointReservation(v->tile, true);
|
SetDepotWaypointReservation(v->tile, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user