1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-30 02:05:13 +01:00

Modify game_command_remove_scenery to take unshifted scenery quadrant

This commit is contained in:
Michael Steenbeek
2018-10-03 12:03:18 +02:00
parent 90d7e146f7
commit 28e8b4e12b
8 changed files with 10 additions and 13 deletions

View File

@@ -816,9 +816,6 @@ static int32_t track_design_place_scenery(
uint8_t quadrant = (scenery->flags >> 2) + _currentTrackPieceDirection;
quadrant &= 3;
// So called because it mirrors the SmallSceneryElement->type byte.
uint8_t typeByte = rotation | (quadrant << 6) | TILE_ELEMENT_TYPE_SMALL_SCENERY;
rct_scenery_entry* small_scenery = get_small_scenery_entry(entry_index);
if (!(!scenery_small_entry_has_flag(small_scenery, SMALL_SCENERY_FLAG_FULL_TILE)
&& scenery_small_entry_has_flag(small_scenery, SMALL_SCENERY_FLAG_DIAGONAL))
@@ -827,12 +824,12 @@ static int32_t track_design_place_scenery(
SMALL_SCENERY_FLAG_DIAGONAL | SMALL_SCENERY_FLAG_HALF_SPACE
| SMALL_SCENERY_FLAG_THREE_QUARTERS))
{
typeByte &= ~TILE_ELEMENT_QUADRANT_MASK;
quadrant = 0;
}
z = (scenery->z * 8 + originZ) / 8;
game_do_command(
mapCoord.x, flags | typeByte << 8, mapCoord.y, (entry_index << 8) | z, GAME_COMMAND_REMOVE_SCENERY,
mapCoord.x, flags | quadrant << 8, mapCoord.y, (entry_index << 8) | z, GAME_COMMAND_REMOVE_SCENERY,
0, 0);
break;
}