diff --git a/src/openrct2-ui/interface/ViewportInteraction.cpp b/src/openrct2-ui/interface/ViewportInteraction.cpp index b8ae99cb01..c8cb601990 100644 --- a/src/openrct2-ui/interface/ViewportInteraction.cpp +++ b/src/openrct2-ui/interface/ViewportInteraction.cpp @@ -467,8 +467,8 @@ static void viewport_interaction_remove_scenery(rct_tile_element* tileElement, i { gGameCommandErrorTitle = STR_CANT_REMOVE_THIS; game_do_command( - x, (tileElement->type << 8) | 1, y, (tileElement->AsSmallScenery()->GetEntryIndex() << 8) | tileElement->base_height, - GAME_COMMAND_REMOVE_SCENERY, 0, 0); + x, (tileElement->type << 8) | GAME_COMMAND_FLAG_APPLY, y, + (tileElement->AsSmallScenery()->GetEntryIndex() << 8) | tileElement->base_height, GAME_COMMAND_REMOVE_SCENERY, 0, 0); } /** diff --git a/src/openrct2/ride/TrackDesign.cpp b/src/openrct2/ride/TrackDesign.cpp index 7877d57ac6..f76fce801d 100644 --- a/src/openrct2/ride/TrackDesign.cpp +++ b/src/openrct2/ride/TrackDesign.cpp @@ -816,7 +816,8 @@ static int32_t track_design_place_scenery( uint8_t quadrant = (scenery->flags >> 2) + _currentTrackPieceDirection; quadrant &= 3; - uint8_t bh = rotation | (quadrant << 6) | TILE_ELEMENT_TYPE_SMALL_SCENERY; + // 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) @@ -826,12 +827,13 @@ static int32_t track_design_place_scenery( SMALL_SCENERY_FLAG_DIAGONAL | SMALL_SCENERY_FLAG_HALF_SPACE | SMALL_SCENERY_FLAG_THREE_QUARTERS)) { - bh &= 0x3F; + typeByte &= ~TILE_ELEMENT_QUADRANT_MASK; } z = (scenery->z * 8 + originZ) / 8; game_do_command( - mapCoord.x, flags | bh << 8, mapCoord.y, (entry_index << 8) | z, GAME_COMMAND_REMOVE_SCENERY, 0, 0); + mapCoord.x, flags | typeByte << 8, mapCoord.y, (entry_index << 8) | z, GAME_COMMAND_REMOVE_SCENERY, + 0, 0); break; } case OBJECT_TYPE_LARGE_SCENERY: diff --git a/src/openrct2/world/Scenery.cpp b/src/openrct2/world/Scenery.cpp index 9453e945e9..d990e12a72 100644 --- a/src/openrct2/world/Scenery.cpp +++ b/src/openrct2/world/Scenery.cpp @@ -184,8 +184,10 @@ void scenery_remove_ghost_tool_placement() if (gSceneryGhostType & SCENERY_ENTRY_FLAG_0) { gSceneryGhostType &= ~SCENERY_ENTRY_FLAG_0; + uint8_t flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_5 + | GAME_COMMAND_FLAG_GHOST; game_do_command( - x, 105 | (gSceneryTileElementType << 8), y, z | (gSceneryPlaceObject << 8), GAME_COMMAND_REMOVE_SCENERY, 0, 0); + x, flags | (gSceneryTileElementType << 8), y, z | (gSceneryPlaceObject << 8), GAME_COMMAND_REMOVE_SCENERY, 0, 0); } if (gSceneryGhostType & SCENERY_ENTRY_FLAG_1)