Fix #4502: Error messages aren't detailed

Most likely a regression of 097c5b101d. 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.
This commit is contained in:
Ted John 2016-10-02 12:49:30 +01:00
parent 22c7cd4179
commit e7ef1ca6e0
1 changed files with 1 additions and 1 deletions

View File

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