summaryrefslogtreecommitdiff
path: root/ai
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-06-04 09:28:33 +0000
committertron <tron@openttd.org>2006-06-04 09:28:33 +0000
commita0caafeb5075ca58232068b48050717f9cf02313 (patch)
tree6608f31fde29931d1c8c939c55782cc8de75c8fb /ai
parent9cf3badfcf4e99f20b8a751457ee76d22fc9f110 (diff)
downloadopenttd-a0caafeb5075ca58232068b48050717f9cf02313.tar.xz
(svn r5094) Remove _new_{aircraft,roadveh,ship,train,wagon}_id. _new_vehicle_id is enough.
Diffstat (limited to 'ai')
-rw-r--r--ai/default/default.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ai/default/default.c b/ai/default/default.c
index 7563e391a..8ccb375a2 100644
--- a/ai/default/default.c
+++ b/ai/default/default.c
@@ -316,7 +316,7 @@ static void AiHandleReplaceTrain(Player *p)
if (!CmdFailed(DoCommand(0, v->index, 2, DC_EXEC, CMD_SELL_RAIL_WAGON)) &&
!CmdFailed(DoCommand(tile, veh, 0, DC_EXEC, CMD_BUILD_RAIL_VEHICLE)) ) {
- VehicleID veh = _new_train_id;
+ VehicleID veh = _new_vehicle_id;
AiRestoreVehicleOrders(GetVehicle(veh), orderbak);
DoCommand(0, veh, 0, DC_EXEC, CMD_START_STOP_TRAIN);
@@ -345,7 +345,7 @@ static void AiHandleReplaceRoadVeh(Player *p)
if (!CmdFailed(DoCommand(0, v->index, 0, DC_EXEC, CMD_SELL_ROAD_VEH)) &&
!CmdFailed(DoCommand(tile, veh, 0, DC_EXEC, CMD_BUILD_ROAD_VEH)) ) {
- VehicleID veh = _new_roadveh_id;
+ VehicleID veh = _new_vehicle_id;
AiRestoreVehicleOrders(GetVehicle(veh), orderbak);
DoCommand(0, veh, 0, DC_EXEC, CMD_START_STOP_ROADVEH);
@@ -374,7 +374,7 @@ static void AiHandleReplaceAircraft(Player *p)
if (!CmdFailed(DoCommand(0, v->index, 0, DC_EXEC, CMD_SELL_AIRCRAFT)) &&
!CmdFailed(DoCommand(tile, veh, 0, DC_EXEC, CMD_BUILD_AIRCRAFT)) ) {
- VehicleID veh = _new_aircraft_id;
+ VehicleID veh = _new_vehicle_id;
AiRestoreVehicleOrders(GetVehicle(veh), orderbak);
DoCommand(0, veh, 0, DC_EXEC, CMD_START_STOP_AIRCRAFT);
@@ -2382,7 +2382,7 @@ static void AiStateBuildRailVeh(Player *p)
if (veh == INVALID_ENGINE) goto handle_nocash;
cost = DoCommand(tile, veh, 0, DC_EXEC, CMD_BUILD_RAIL_VEHICLE);
if (CmdFailed(cost)) goto handle_nocash;
- p->ai.wagon_list[i] = _new_wagon_id;
+ p->ai.wagon_list[i] = _new_vehicle_id;
p->ai.wagon_list[i + 1] = INVALID_VEHICLE;
return;
}
@@ -2410,7 +2410,7 @@ handle_nocash:
// Try to build the locomotive
cost = DoCommand(tile, veh, 0, DC_EXEC, CMD_BUILD_RAIL_VEHICLE);
assert(!CmdFailed(cost));
- loco_id = _new_train_id;
+ loco_id = _new_vehicle_id;
// Sell a vehicle if the train is double headed.
v = GetVehicle(loco_id);
@@ -3163,7 +3163,7 @@ static void AiStateBuildRoadVehicles(Player *p)
if (CmdFailed(DoCommand(tile, veh, 0, DC_EXEC, CMD_BUILD_ROAD_VEH))) return;
- loco_id = _new_roadveh_id;
+ loco_id = _new_vehicle_id;
for (i = 0; p->ai.order_list_blocks[i] != 0xFF; i++) {
const AiBuildRec* aib = &p->ai.src + p->ai.order_list_blocks[i];
@@ -3454,7 +3454,7 @@ static void AiStateBuildAircraftVehicles(Player *p)
* and offset to the FIRST depot because the AI picks the st->xy tile */
tile += ToTileIndexDiff(GetAirport(GetStationByTile(tile)->airport_type)->airport_depots[0]);
if (CmdFailed(DoCommand(tile, veh, 0, DC_EXEC, CMD_BUILD_AIRCRAFT))) return;
- loco_id = _new_aircraft_id;
+ loco_id = _new_vehicle_id;
for (i=0; p->ai.order_list_blocks[i] != 0xFF; i++) {
AiBuildRec *aib = (&p->ai.src) + p->ai.order_list_blocks[i];