diff options
author | bjarni <bjarni@openttd.org> | 2006-12-05 23:57:04 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2006-12-05 23:57:04 +0000 |
commit | 1f02a49721945405cb759f3b458a9b913461b2f8 (patch) | |
tree | ab6b8f0d3aa0387b1e9bcb8b43661cef34413984 | |
parent | f2a70e3e26d2aeb75a63b60338bdd12f3046f5cd (diff) | |
download | openttd-1f02a49721945405cb759f3b458a9b913461b2f8.tar.xz |
(svn r7389) -Fix: when forcing a vehicle to go to a depot, clear refit orders from current orders (caused refit error popup when not having no orders)
-rw-r--r-- | aircraft_cmd.c | 1 | ||||
-rw-r--r-- | roadveh_cmd.c | 1 | ||||
-rw-r--r-- | ship_cmd.c | 1 | ||||
-rw-r--r-- | train_cmd.c | 1 |
4 files changed, 4 insertions, 0 deletions
diff --git a/aircraft_cmd.c b/aircraft_cmd.c index 4fa4fc3f9..016014c8a 100644 --- a/aircraft_cmd.c +++ b/aircraft_cmd.c @@ -558,6 +558,7 @@ int32 CmdSendAircraftToHangar(TileIndex tile, uint32 flags, uint32 p1, uint32 p2 v->current_order.type = OT_GOTO_DEPOT; v->current_order.flags = OF_NON_STOP; if (!(p2 & DEPOT_SERVICE)) SETBIT(v->current_order.flags, OFB_HALT_IN_DEPOT); + v->current_order.refit_cargo = CT_INVALID; v->current_order.dest = next_airport_index; InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); if (p2 & DEPOT_LOCATE_HANGAR || (p2 & DEPOT_SERVICE && v->u.air.state == FLYING && !next_airport_has_hangar)) { diff --git a/roadveh_cmd.c b/roadveh_cmd.c index c53dbeb97..b5ed7807d 100644 --- a/roadveh_cmd.c +++ b/roadveh_cmd.c @@ -420,6 +420,7 @@ int32 CmdSendRoadVehToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) v->current_order.type = OT_GOTO_DEPOT; v->current_order.flags = OF_NON_STOP; if (!(p2 & DEPOT_SERVICE)) SETBIT(v->current_order.flags, OFB_HALT_IN_DEPOT); + v->current_order.refit_cargo = CT_INVALID; v->current_order.dest = dep->index; v->dest_tile = dep->xy; InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); diff --git a/ship_cmd.c b/ship_cmd.c index c7e6f9c3a..0f361b54d 100644 --- a/ship_cmd.c +++ b/ship_cmd.c @@ -1030,6 +1030,7 @@ int32 CmdSendShipToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) v->current_order.type = OT_GOTO_DEPOT; v->current_order.flags = OF_NON_STOP; if (!(p2 & DEPOT_SERVICE)) SETBIT(v->current_order.flags, OFB_HALT_IN_DEPOT); + v->current_order.refit_cargo = CT_INVALID; v->current_order.dest = dep->index; InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); } diff --git a/train_cmd.c b/train_cmd.c index a1792deb5..6d56e6166 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -2050,6 +2050,7 @@ int32 CmdSendTrainToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) v->current_order.flags = OF_NON_STOP; if (!(p2 & DEPOT_SERVICE)) SETBIT(v->current_order.flags, OFB_HALT_IN_DEPOT); v->current_order.dest = GetDepotByTile(tfdd.tile)->index; + v->current_order.refit_cargo = CT_INVALID; InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); /* If there is no depot in front, reverse automatically */ if (tfdd.reverse) |