From 406c22d7e3e52e5fc6fd837dbad857b9dede97fc Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 16 Oct 2007 21:15:34 +0000 Subject: (svn r11279) -Codechange: use a typedeffed type for all magic with GameDifficulty instead on relying ints to always be 32 bits, which they are not. --- src/misc_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/misc_cmd.cpp') diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp index 45e8f99c6..7102135e9 100644 --- a/src/misc_cmd.cpp +++ b/src/misc_cmd.cpp @@ -380,7 +380,7 @@ CommandCost CmdChangeDifficultyLevel(TileIndex tile, uint32 flags, uint32 p1, ui if (flags & DC_EXEC) { if (p1 != (uint32)-1L) { - ((int*)&_opt_ptr->diff)[p1] = p2; + ((GDType*)&_opt_ptr->diff)[p1] = p2; _opt_ptr->diff_level = 3; // custom difficulty level } else { _opt_ptr->diff_level = p2; -- cgit v1.2.3-54-g00ecf