mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 03:23:15 +01:00
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:
committed by
Ted John
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,
|
||||
|
||||
Reference in New Issue
Block a user