summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2008-11-02 19:32:24 +0000
committermichi_cc <michi_cc@openttd.org>2008-11-02 19:32:24 +0000
commit023ce24b1a17af2394459866603b400e7b23f6fc (patch)
tree075b630eaffde97dc620e5cc8bd4bd97314013ed /src/vehicle.cpp
parent297392f3fabdb03b0d6c502d42b6b73a014c550b (diff)
downloadopenttd-023ce24b1a17af2394459866603b400e7b23f6fc.tar.xz
(svn r14559) -Fix [FS#2387]: A train could be blocked inside a depot if it was reversed just after leaving the depot.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index f69951e89..95986e061 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -1558,6 +1558,10 @@ void VehicleEnterDepot(Vehicle *v)
switch (v->type) {
case VEH_TRAIN:
InvalidateWindowClasses(WC_TRAINS_LIST);
+ /* Clear path reservation */
+ SetDepotWaypointReservation(v->tile, false);
+ if (_settings_client.gui.show_track_reservation) MarkTileDirtyByTile(v->tile);
+
if (!IsFrontEngine(v)) v = v->First();
UpdateSignalsOnSegment(v->tile, INVALID_DIAGDIR, v->owner);
v->load_unload_time_rem = 0;