diff options
Diffstat (limited to 'src/ai/default')
-rw-r--r-- | src/ai/default/default.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp index 92b852e43..1d6ca0189 100644 --- a/src/ai/default/default.cpp +++ b/src/ai/default/default.cpp @@ -305,7 +305,7 @@ static void AiRestoreVehicleOrders(Vehicle *v, BackuppedOrders *bak) static void AiHandleReplaceTrain(Player *p) { const Vehicle* v = p->ai.cur_veh; - BackuppedOrders orderbak[1]; + BackuppedOrders orderbak; EngineID veh; // wait until the vehicle reaches the depot. @@ -318,13 +318,13 @@ static void AiHandleReplaceTrain(Player *p) if (veh != INVALID_ENGINE) { TileIndex tile; - BackupVehicleOrders(v, orderbak); + BackupVehicleOrders(v, &orderbak); tile = v->tile; if (CmdSucceeded(DoCommand(0, v->index, 2, DC_EXEC, CMD_SELL_RAIL_WAGON)) && CmdSucceeded(DoCommand(tile, veh, 0, DC_EXEC, CMD_BUILD_RAIL_VEHICLE))) { VehicleID veh = _new_vehicle_id; - AiRestoreVehicleOrders(GetVehicle(veh), orderbak); + AiRestoreVehicleOrders(GetVehicle(veh), &orderbak); DoCommand(0, veh, 0, DC_EXEC, CMD_START_STOP_TRAIN); DoCommand(0, veh, _ai_service_interval, DC_EXEC, CMD_CHANGE_SERVICE_INT); |