(svn r13255) -Codechange: move _opt to _settings.
This commit is contained in:
@@ -395,11 +395,11 @@ CommandCost CmdChangeDifficultyLevel(TileIndex tile, uint32 flags, uint32 p1, ui
|
||||
{
|
||||
if (p1 != (uint32)-1L && ((int32)p1 >= GAME_DIFFICULTY_NUM || (int32)p1 < 0)) return CMD_ERROR;
|
||||
|
||||
GameOptions *opt_ptr = (_game_mode == GM_MENU) ? &_opt_newgame : &_opt;
|
||||
DifficultySettings *opt_ptr = (_game_mode == GM_MENU) ? &_settings_newgame.difficulty : &_settings.difficulty;
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
if (p1 != (uint32)-1L) {
|
||||
((GDType*)&opt_ptr->diff)[p1] = p2;
|
||||
((GDType*)opt_ptr)[p1] = p2;
|
||||
opt_ptr->diff_level = 3; // custom difficulty level
|
||||
} else {
|
||||
opt_ptr->diff_level = p2;
|
||||
|
Reference in New Issue
Block a user