summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/ai.cpp4
-rw-r--r--src/ai/default/default.cpp4
-rw-r--r--src/ai/trolly/trolly.cpp4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/ai/ai.cpp b/src/ai/ai.cpp
index e48c8ef00..b72efc921 100644
--- a/src/ai/ai.cpp
+++ b/src/ai/ai.cpp
@@ -184,8 +184,8 @@ void AI_RunGameLoop()
_ai.tick++;
/* Make sure the AI follows the difficulty rule.. */
- assert(_opt.diff.competitor_speed <= 4);
- if ((_ai.tick & ((1 << (4 - _opt.diff.competitor_speed)) - 1)) != 0) return;
+ assert(_settings.difficulty.competitor_speed <= 4);
+ if ((_ai.tick & ((1 << (4 - _settings.difficulty.competitor_speed)) - 1)) != 0) return;
/* Check for AI-client (so joining a network with an AI) */
if (!_networking || _network_server) {
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp
index 70aaf2c04..14fc43392 100644
--- a/src/ai/default/default.cpp
+++ b/src/ai/default/default.cpp
@@ -2550,7 +2550,7 @@ handle_nocash:
bool is_pass = (
_players_ai[p->index].cargo_type == CT_PASSENGERS ||
_players_ai[p->index].cargo_type == CT_MAIL ||
- (_opt.landscape == LT_TEMPERATE && _players_ai[p->index].cargo_type == CT_VALUABLES)
+ (_settings.game_creation.landscape == LT_TEMPERATE && _players_ai[p->index].cargo_type == CT_VALUABLES)
);
Order order;
@@ -3285,7 +3285,7 @@ static void AiStateBuildRoadVehicles(Player *p)
bool is_pass = (
_players_ai[p->index].cargo_type == CT_PASSENGERS ||
_players_ai[p->index].cargo_type == CT_MAIL ||
- (_opt.landscape == LT_TEMPERATE && _players_ai[p->index].cargo_type == CT_VALUABLES)
+ (_settings.game_creation.landscape == LT_TEMPERATE && _players_ai[p->index].cargo_type == CT_VALUABLES)
);
Order order;
diff --git a/src/ai/trolly/trolly.cpp b/src/ai/trolly/trolly.cpp
index 4be9819ca..cb572e486 100644
--- a/src/ai/trolly/trolly.cpp
+++ b/src/ai/trolly/trolly.cpp
@@ -1017,7 +1017,7 @@ static void AiNew_State_BuildPath(Player *p)
if (_players_ainew[p->index].temp == -1) {
DEBUG(ai, 1, "Starting to build new path");
// Init the counter
- _players_ainew[p->index].counter = (4 - _opt.diff.competitor_speed) * AI_BUILDPATH_PAUSE + 1;
+ _players_ainew[p->index].counter = (4 - _settings.difficulty.competitor_speed) * AI_BUILDPATH_PAUSE + 1;
// Set the position to the startingplace (-1 because in a minute we do ++)
_players_ainew[p->index].path_info.position = -1;
// And don't do this again
@@ -1026,7 +1026,7 @@ static void AiNew_State_BuildPath(Player *p)
// Building goes very fast on normal rate, so we are going to slow it down..
// By let the counter count from AI_BUILDPATH_PAUSE to 0, we have a nice way :)
if (--_players_ainew[p->index].counter != 0) return;
- _players_ainew[p->index].counter = (4 - _opt.diff.competitor_speed) * AI_BUILDPATH_PAUSE + 1;
+ _players_ainew[p->index].counter = (4 - _settings.difficulty.competitor_speed) * AI_BUILDPATH_PAUSE + 1;
// Increase the building position
_players_ainew[p->index].path_info.position++;