Mercurial > hg > openttd
changeset 1858:b181caa5e1f5 draft
(svn r2364) - Fix (regression): [ 1206850 ] Cannot change difficulty in main menu, always the value it was before you changed it. A too rigid check forgot to check the parameter value -1 which set the difficulty level itself.
author | Darkvater <Darkvater@openttd.org> |
---|---|
date | Tue, 24 May 2005 16:13:37 +0000 |
parents | 7c991c7c1505 |
children | 8c20595a4262 |
files | misc_cmd.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/misc_cmd.c +++ b/misc_cmd.c @@ -256,7 +256,7 @@ */ int32 CmdChangeDifficultyLevel(int x, int y, uint32 flags, uint32 p1, uint32 p2) { - if (p1 >= GAME_DIFFICULTY_NUM) return CMD_ERROR; + if ((int32)p1 >= GAME_DIFFICULTY_NUM && p1 != (uint32)-1L) return CMD_ERROR; if (flags & DC_EXEC) { if (p1 != (uint32)-1L) {