# HG changeset patch # User bjarni # Date 1165363024 0 # Node ID 08336337aae0490cf8c6ed9d49d9cccc80a21f30 # Parent eae66ac0280356b26f9208a16b398163e2aeffe3 (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) diff -r eae66ac02803 -r 08336337aae0 aircraft_cmd.c --- a/aircraft_cmd.c Tue Dec 05 23:37:04 2006 +0000 +++ b/aircraft_cmd.c Tue Dec 05 23:57:04 2006 +0000 @@ -558,6 +558,7 @@ 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 -r eae66ac02803 -r 08336337aae0 roadveh_cmd.c --- a/roadveh_cmd.c Tue Dec 05 23:37:04 2006 +0000 +++ b/roadveh_cmd.c Tue Dec 05 23:57:04 2006 +0000 @@ -420,6 +420,7 @@ 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 -r eae66ac02803 -r 08336337aae0 ship_cmd.c --- a/ship_cmd.c Tue Dec 05 23:37:04 2006 +0000 +++ b/ship_cmd.c Tue Dec 05 23:57:04 2006 +0000 @@ -1030,6 +1030,7 @@ 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 -r eae66ac02803 -r 08336337aae0 train_cmd.c --- a/train_cmd.c Tue Dec 05 23:37:04 2006 +0000 +++ b/train_cmd.c Tue Dec 05 23:57:04 2006 +0000 @@ -2050,6 +2050,7 @@ 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)