diff options
Diffstat (limited to 'src/ai/default/default.cpp')
-rw-r--r-- | src/ai/default/default.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp index 2843d0dc7..70aaf2c04 100644 --- a/src/ai/default/default.cpp +++ b/src/ai/default/default.cpp @@ -1570,21 +1570,21 @@ static void AiStateWantNewRoute(Player *p) for (;;) { r = (uint16)Random(); - if (_patches.ai_disable_veh_train && - _patches.ai_disable_veh_roadveh && - _patches.ai_disable_veh_aircraft && - _patches.ai_disable_veh_ship) { + if (_settings.ai.ai_disable_veh_train && + _settings.ai.ai_disable_veh_roadveh && + _settings.ai.ai_disable_veh_aircraft && + _settings.ai.ai_disable_veh_ship) { return; } if (r < 0x7626) { - if (_patches.ai_disable_veh_train) continue; + if (_settings.ai.ai_disable_veh_train) continue; AiWantTrainRoute(p); } else if (r < 0xC4EA) { - if (_patches.ai_disable_veh_roadveh) continue; + if (_settings.ai.ai_disable_veh_roadveh) continue; AiWantRoadRoute(p); } else if (r < 0xD89B) { - if (_patches.ai_disable_veh_aircraft) continue; + if (_settings.ai.ai_disable_veh_aircraft) continue; AiWantAircraftRoute(p); } else { /* Ships are not implemented in this (broken) AI */ @@ -1603,7 +1603,7 @@ static void AiStateWantNewRoute(Player *p) static bool AiCheckTrackResources(TileIndex tile, const AiDefaultBlockData *p, byte cargo) { - uint rad = (_patches.modified_catchment) ? CA_TRAIN : CA_UNMODIFIED; + uint rad = (_settings.station.modified_catchment) ? CA_TRAIN : CA_UNMODIFIED; for (; p->mode != 4; p++) { AcceptedCargo values; @@ -2599,7 +2599,7 @@ static bool AiCheckRoadResources(TileIndex tile, const AiDefaultBlockData *p, by uint values[NUM_CARGO]; int rad; - if (_patches.modified_catchment) { + if (_settings.station.modified_catchment) { rad = CA_TRUCK; // Same as CA_BUS at the moment? } else { // change that at some point? rad = 4; @@ -3423,7 +3423,7 @@ static bool AiCheckAirportResources(TileIndex tile, const AiDefaultBlockData *p, const AirportFTAClass* airport = GetAirport(p->attr); uint w = airport->size_x; uint h = airport->size_y; - uint rad = _patches.modified_catchment ? airport->catchment : (uint)CA_UNMODIFIED; + uint rad = _settings.station.modified_catchment ? airport->catchment : (uint)CA_UNMODIFIED; if (cargo & 0x80) { GetProductionAroundTiles(values, tile2, w, h, rad); @@ -3975,7 +3975,7 @@ void AiDoGameLoop(Player *p) // to the patch-setting // Also, it takes into account the setting if the service-interval is in days // or in % - _ai_service_interval = _patches.servint_ispercent ? 80 : 180; + _ai_service_interval = _settings.vehicle.servint_ispercent ? 80 : 180; if (IsHumanPlayer(_current_player)) return; |