summaryrefslogtreecommitdiff
path: root/src/misc_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc_cmd.cpp')
-rw-r--r--src/misc_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp
index 62ec5bcc7..49e3eafdb 100644
--- a/src/misc_cmd.cpp
+++ b/src/misc_cmd.cpp
@@ -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;