summaryrefslogtreecommitdiff
path: root/ai/default
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-01-05 21:35:54 +0000
committertron <tron@openttd.org>2006-01-05 21:35:54 +0000
commitaf70b49bf737b03d83e239f5af1fdbc83c3674dc (patch)
tree36adc599aa918a785fc38a75ba97172dcddffef5 /ai/default
parent5ac1a89f924345f6c75a81423a41f95656070cc0 (diff)
downloadopenttd-af70b49bf737b03d83e239f5af1fdbc83c3674dc.tar.xz
(svn r3367) Unify the 4 distinct CMD_CHANGE_{AIRCRAFT,ROADVEH,SHIP,TRAIN}_SERVICE_INT commands into one CMD_CHANGE_SERVICE_INT command.
As side effect this is a -Fix: The default AI tried to change the service intervals of vehicles via the CMD_CHANGE_TRAIN_SERVICE_INT command - regardless of the type of the vehicle - which of course failed for non-trains
Diffstat (limited to 'ai/default')
-rw-r--r--ai/default/default.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ai/default/default.c b/ai/default/default.c
index 150e0be92..8daaf239e 100644
--- a/ai/default/default.c
+++ b/ai/default/default.c
@@ -311,7 +311,7 @@ static void AiHandleReplaceTrain(Player *p)
AiRestoreVehicleOrders(GetVehicle(veh), orderbak);
DoCommandByTile(0, veh, 0, DC_EXEC, CMD_START_STOP_TRAIN);
- DoCommandByTile(0, veh, _ai_service_interval, DC_EXEC, CMD_CHANGE_TRAIN_SERVICE_INT);
+ DoCommandByTile(0, veh, _ai_service_interval, DC_EXEC, CMD_CHANGE_SERVICE_INT);
}
}
}
@@ -340,7 +340,7 @@ static void AiHandleReplaceRoadVeh(Player *p)
AiRestoreVehicleOrders(GetVehicle(veh), orderbak);
DoCommandByTile(0, veh, 0, DC_EXEC, CMD_START_STOP_ROADVEH);
- DoCommandByTile(0, veh, _ai_service_interval, DC_EXEC, CMD_CHANGE_TRAIN_SERVICE_INT);
+ DoCommandByTile(0, veh, _ai_service_interval, DC_EXEC, CMD_CHANGE_SERVICE_INT);
}
}
}
@@ -369,7 +369,7 @@ static void AiHandleReplaceAircraft(Player *p)
AiRestoreVehicleOrders(GetVehicle(veh), orderbak);
DoCommandByTile(0, veh, 0, DC_EXEC, CMD_START_STOP_AIRCRAFT);
- DoCommandByTile(0, veh, _ai_service_interval, DC_EXEC, CMD_CHANGE_TRAIN_SERVICE_INT);
+ DoCommandByTile(0, veh, _ai_service_interval, DC_EXEC, CMD_CHANGE_SERVICE_INT);
}
}
}
@@ -2450,7 +2450,7 @@ handle_nocash:
DoCommandByTile(0, loco_id, 0, DC_EXEC, CMD_START_STOP_TRAIN);
- DoCommandByTile(0, loco_id, _ai_service_interval, DC_EXEC, CMD_CHANGE_TRAIN_SERVICE_INT);
+ DoCommandByTile(0, loco_id, _ai_service_interval, DC_EXEC, CMD_CHANGE_SERVICE_INT);
if (p->ai.num_want_fullload != 0)
p->ai.num_want_fullload--;
@@ -3207,7 +3207,7 @@ static void AiStateBuildRoadVehicles(Player *p)
}
DoCommandByTile(0, loco_id, 0, DC_EXEC, CMD_START_STOP_ROADVEH);
- DoCommandByTile(0, loco_id, _ai_service_interval, DC_EXEC, CMD_CHANGE_TRAIN_SERVICE_INT);
+ DoCommandByTile(0, loco_id, _ai_service_interval, DC_EXEC, CMD_CHANGE_SERVICE_INT);
if (p->ai.num_want_fullload != 0) p->ai.num_want_fullload--;
if (--p->ai.num_loco_to_build == 0) p->ai.state = AIS_0;
@@ -3521,7 +3521,7 @@ static void AiStateBuildAircraftVehicles(Player *p)
DoCommandByTile(0, loco_id, 0, DC_EXEC, CMD_START_STOP_AIRCRAFT);
- DoCommandByTile(0, loco_id, _ai_service_interval, DC_EXEC, CMD_CHANGE_TRAIN_SERVICE_INT);
+ DoCommandByTile(0, loco_id, _ai_service_interval, DC_EXEC, CMD_CHANGE_SERVICE_INT);
if (p->ai.num_want_fullload != 0)
p->ai.num_want_fullload--;