From af70b49bf737b03d83e239f5af1fdbc83c3674dc Mon Sep 17 00:00:00 2001 From: tron Date: Thu, 5 Jan 2006 21:35:54 +0000 Subject: (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 --- ai/default/default.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ai') 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--; -- cgit v1.2.3-70-g09d2