1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-18 18:02:37 +01:00

(svn r17598) [0.7] -Backport from trunk:

- Fix: Vehicle image was not always updated when needed (r17594)
- Fix: [NoAI] Could not query the size of small airports when they could not be build anymore [FS#3212] (r17591)
- Fix: Erroneous message about changing the difficulty level [FS#3220] (r17588)
- Fix: Assertion triggered when the second vehicle in a 101+ (or 11+ if mammoth trains is disabled) vehicle free wagon chain is an engine and the first vehicle is moved to another chain [FS#3208] (r17576)
This commit is contained in:
rubidium
2009-09-21 15:41:58 +00:00
parent 429eb416ac
commit 57992d5eac
13 changed files with 124 additions and 71 deletions

View File

@@ -551,6 +551,9 @@ public:
GameSettings *opt_ptr = (_game_mode == GM_MENU) ? &_settings_newgame : &_settings_game;
uint i;
GetSettingFromName("difficulty.diff_level", &i);
DoCommandP(0, i, this->opt_mod_temp.difficulty.diff_level, CMD_CHANGE_SETTING);
const SettingDesc *sd = GetSettingFromName("difficulty.max_no_competitors", &i);
for (uint btn = 0; btn != GAME_DIFFICULTY_NUM; btn++, sd++) {
int32 new_val = (int32)ReadValue(GetVariableAddress(&this->opt_mod_temp, &sd->save), sd->save.conv);
@@ -560,9 +563,6 @@ public:
DoCommandP(0, i + btn, new_val, CMD_CHANGE_SETTING);
}
}
GetSettingFromName("difficulty.diff_level", &i);
DoCommandP(0, i, this->opt_mod_temp.difficulty.diff_level, CMD_CHANGE_SETTING);
delete this;
/* If we are in the editor, we should reload the economy.
* This way when you load a game, the max loan and interest rate