diff options
Diffstat (limited to 'aircraft_cmd.c')
-rw-r--r-- | aircraft_cmd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/aircraft_cmd.c b/aircraft_cmd.c index d7c8a31bd..440347bdc 100644 --- a/aircraft_cmd.c +++ b/aircraft_cmd.c @@ -1396,12 +1396,18 @@ static void AircraftEnterHangar(Vehicle *v) TriggerVehicle(v, VEHICLE_TRIGGER_DEPOT); if (v->current_order.type == OT_GOTO_DEPOT) { + int32 cost; + InvalidateWindow(WC_VEHICLE_VIEW, v->index); old_order = v->current_order; v->current_order.type = OT_NOTHING; v->current_order.flags = 0; + _current_player = v->owner; + cost = DoCommand(v->tile, v->index, old_order.refit_cargo | old_order.refit_subtype << 8, DC_EXEC, CMD_REFIT_AIRCRAFT); + if (!CmdFailed(cost) && v->owner == _local_player && cost != 0) ShowCostOrIncomeAnimation(v->x_pos, v->y_pos, v->z_pos, cost); + if (HASBIT(old_order.flags, OFB_PART_OF_ORDERS)) { v->cur_order_index++; } else if (HASBIT(old_order.flags, OFB_HALT_IN_DEPOT)) { // force depot visit |