(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.

This commit is contained in:
rubidium
2007-10-16 21:15:34 +00:00
parent c0e5ca11dc
commit 406c22d7e3
4 changed files with 32 additions and 30 deletions

View File

@@ -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;