mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix #1432: Sandbox mode reducing map size causes game to freeze
Shift correctly direction bits when calling game_do_command. game_command_remove_large_scenery() expects the direction bits to be shifted 8 times to the left, so the call to game_do_command has been modified to match this requirement.
This commit is contained in:
parent
59c3656352
commit
1e3504cd36
|
@ -4549,7 +4549,7 @@ static void clear_elements_at(int x, int y)
|
|||
gGameCommandErrorTitle = STR_CANT_REMOVE_THIS;
|
||||
game_do_command(
|
||||
x,
|
||||
(GAME_COMMAND_FLAG_APPLY) | (mapElement->type & MAP_ELEMENT_DIRECTION_MASK),
|
||||
(GAME_COMMAND_FLAG_APPLY) | ((mapElement->type & MAP_ELEMENT_DIRECTION_MASK) << 8),
|
||||
y,
|
||||
(mapElement->base_height) | (((mapElement->properties.scenerymultiple.type >> 8) >> 2) << 8),
|
||||
GAME_COMMAND_REMOVE_LARGE_SCENERY,
|
||||
|
|
Loading…
Reference in New Issue