src/misc_cmd.cpp
changeset 9346 bfd803297888
parent 9334 28ac6c8e0795
child 9354 845e07db4549
--- a/src/misc_cmd.cpp	Sun May 25 11:18:57 2008 +0000
+++ b/src/misc_cmd.cpp	Sun May 25 12:57:39 2008 +0000
@@ -395,12 +395,14 @@
 {
 	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;
+
 	if (flags & DC_EXEC) {
 		if (p1 != (uint32)-1L) {
-			((GDType*)&_opt_ptr->diff)[p1] = p2;
-			_opt_ptr->diff_level = 3; // custom difficulty level
+			((GDType*)&opt_ptr->diff)[p1] = p2;
+			opt_ptr->diff_level = 3; // custom difficulty level
 		} else {
-			_opt_ptr->diff_level = p2;
+			opt_ptr->diff_level = p2;
 		}
 
 		/* Since the tolerance of the town council has a direct impact on the noise generation/tolerance,