diff options
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r-- | roadveh_cmd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c index e8f0d2884..a38701237 100644 --- a/roadveh_cmd.c +++ b/roadveh_cmd.c @@ -1588,6 +1588,7 @@ void RoadVehEnterDepot(Vehicle *v) if (v->current_order.type == OT_GOTO_DEPOT) { Order t; + int32 cost; InvalidateWindow(WC_VEHICLE_VIEW, v->index); @@ -1595,6 +1596,10 @@ void RoadVehEnterDepot(Vehicle *v) v->current_order.type = OT_DUMMY; v->current_order.flags = 0; + _current_player = v->owner; + cost = DoCommand(v->tile, v->index, t.refit_cargo | t.refit_subtype << 8, DC_EXEC, CMD_REFIT_ROAD_VEH); + if (!CmdFailed(cost) && v->owner == _local_player && cost != 0) ShowCostOrIncomeAnimation(v->x_pos, v->y_pos, v->z_pos, cost); + // Part of the orderlist? if (HASBIT(t.flags, OFB_PART_OF_ORDERS)) { v->cur_order_index++; |