summaryrefslogtreecommitdiff
path: root/src/ai/ai_info.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2011-01-02 12:52:37 +0000
committeryexo <yexo@openttd.org>2011-01-02 12:52:37 +0000
commit4ec6c19d449ea010432bb4972910bffc6ed2c548 (patch)
tree94024344890445f3ff01003299050b19a35b8989 /src/ai/ai_info.cpp
parentb22945350f6a574e8cb8c5ec30c032c01a107cba (diff)
downloadopenttd-4ec6c19d449ea010432bb4972910bffc6ed2c548.tar.xz
(svn r21697) -Codechange: use GetGameSettings() in a few more places to enhance readability
Diffstat (limited to 'src/ai/ai_info.cpp')
-rw-r--r--src/ai/ai_info.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/ai_info.cpp b/src/ai/ai_info.cpp
index 2194f20c5..73a7ba05b 100644
--- a/src/ai/ai_info.cpp
+++ b/src/ai/ai_info.cpp
@@ -338,7 +338,7 @@ int AIInfo::GetSettingDefaultValue(const char *name) const
for (AIConfigItemList::const_iterator it = this->config_list.begin(); it != this->config_list.end(); it++) {
if (strcmp((*it).name, name) != 0) continue;
/* The default value depends on the difficulty level */
- switch ((_game_mode == GM_MENU) ? _settings_newgame.difficulty.diff_level : _settings_game.difficulty.diff_level) {
+ switch (GetGameSettings().difficulty.diff_level) {
case 0: return (*it).easy_value;
case 1: return (*it).medium_value;
case 2: return (*it).hard_value;