mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 23:50:25 +00:00
(svn r14559) -Fix [FS#2387]: A train could be blocked inside a depot if it was reversed just after leaving the depot.
This commit is contained in:
parent
f649496caa
commit
808d9255a8
@ -3654,10 +3654,6 @@ static void TrainController(Vehicle *v, Vehicle *nomove, bool update_image)
|
|||||||
TrainEnterStation(v, r >> VETS_STATION_ID_OFFSET);
|
TrainEnterStation(v, r >> VETS_STATION_ID_OFFSET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (v->Next() == NULL && IsRailDepotTile(v->tile) && HasBit(r, VETS_ENTERED_WORMHOLE)) {
|
|
||||||
SetDepotWaypointReservation(v->tile, false);
|
|
||||||
if (_settings_client.gui.show_track_reservation) MarkTileDirtyByTile(v->tile);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (v->current_order.IsType(OT_LEAVESTATION)) {
|
if (v->current_order.IsType(OT_LEAVESTATION)) {
|
||||||
v->current_order.Free();
|
v->current_order.Free();
|
||||||
|
@ -1558,6 +1558,10 @@ void VehicleEnterDepot(Vehicle *v)
|
|||||||
switch (v->type) {
|
switch (v->type) {
|
||||||
case VEH_TRAIN:
|
case VEH_TRAIN:
|
||||||
InvalidateWindowClasses(WC_TRAINS_LIST);
|
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();
|
if (!IsFrontEngine(v)) v = v->First();
|
||||||
UpdateSignalsOnSegment(v->tile, INVALID_DIAGDIR, v->owner);
|
UpdateSignalsOnSegment(v->tile, INVALID_DIAGDIR, v->owner);
|
||||||
v->load_unload_time_rem = 0;
|
v->load_unload_time_rem = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user