summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-09-28 21:15:45 +0000
committerrubidium <rubidium@openttd.org>2007-09-28 21:15:45 +0000
commit86dac1533b389de020eada43aa8b2b082d206047 (patch)
tree9c123ba4ba288529f497d5f3152afe0cb9f7232e /src/ai
parentbba0d120b7877e4eddec537815525ba34b96f3a1 (diff)
downloadopenttd-86dac1533b389de020eada43aa8b2b082d206047.tar.xz
(svn r11184) -Codechange: cleanup the code related to backup orders.
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/default/default.cpp6
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);