diff options
author | rubidium <rubidium@openttd.org> | 2007-09-28 21:15:45 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-09-28 21:15:45 +0000 |
commit | beeae81f605bed24081d7d389ad85961e479b461 (patch) | |
tree | 9c123ba4ba288529f497d5f3152afe0cb9f7232e /src/ai | |
parent | e67b985bfac22680f1916280ce6e7dda82620c47 (diff) | |
download | openttd-beeae81f605bed24081d7d389ad85961e479b461.tar.xz |
(svn r11184) -Codechange: cleanup the code related to backup orders.
Diffstat (limited to 'src/ai')
-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); |