Fix crash in scheduled dispatch window with nearest depot dispatch order
This commit is contained in:
@@ -519,9 +519,17 @@ struct SchdispatchWindow : GeneralVehicleWindow {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case OT_GOTO_DEPOT:
|
case OT_GOTO_DEPOT:
|
||||||
SetDParam(1, STR_DEPOT_NAME);
|
if (order->GetDepotActionType() & ODATFB_NEAREST_DEPOT) {
|
||||||
SetDParam(2, v->type);
|
if (v->type == VEH_AIRCRAFT) {
|
||||||
SetDParam(3, order->GetDestination());
|
SetDParam(1, STR_ORDER_GO_TO_NEAREST_HANGAR);
|
||||||
|
} else {
|
||||||
|
SetDParam(1, STR_ORDER_GO_TO_NEAREST_DEPOT);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
SetDParam(1, STR_DEPOT_NAME);
|
||||||
|
SetDParam(2, v->type);
|
||||||
|
SetDParam(3, order->GetDestination());
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user