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:
Daniel Trujillo Viedma 2016-07-11 00:11:04 +02:00 committed by Ted John
parent 59c3656352
commit 1e3504cd36
1 changed files with 1 additions and 1 deletions

View File

@ -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,