From e7ef1ca6e0c79ff52fb0ff93a09dcf78e60d5244 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sun, 2 Oct 2016 12:49:30 +0100 Subject: [PATCH] Fix #4502: Error messages aren't detailed Most likely a regression of 097c5b101dfc4adf1051cf4295c436bec0cd279d. gGameCommandErrorText is now cleared when entering a game command at nest level 0. This should ensure no previous error text is carried over to another game command but also still allow nested game commands to work properly. Potentially fixes #4480: Inappropriate "Land not owned by park" messages. --- src/game.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game.c b/src/game.c index d6d56ab2f0..8788b2e70d 100644 --- a/src/game.c +++ b/src/game.c @@ -460,6 +460,7 @@ int game_do_command_p(int command, int *eax, int *ebx, int *ecx, int *edx, int * flags = *ebx; if (gGameCommandNestLevel == 0) { + gGameCommandErrorText = STR_NONE; gGameCommandIsNetworked = (flags & GAME_COMMAND_FLAG_NETWORKED) != 0; } @@ -572,7 +573,6 @@ int game_do_command_p(int command, int *eax, int *ebx, int *ecx, int *edx, int * if (gGameCommandNestLevel == 0 && (flags & GAME_COMMAND_FLAG_APPLY) && gUnk141F568 == gUnk13CA740 && !(flags & GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED) && !(flags & GAME_COMMAND_FLAG_NETWORKED)) window_error_open(gGameCommandErrorTitle, gGameCommandErrorText); - gGameCommandErrorText = STR_NONE; return MONEY32_UNDEFINED; }