mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 19:13:07 +01:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user