mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Prevent ride construction from setting tiles when scenery tool is active
This commit is contained in:
committed by
Aaron van Geffen
parent
58321ec2cd
commit
0268be92cb
@@ -3140,6 +3140,13 @@ static void window_ride_construction_update_widgets(rct_window *w)
|
||||
|
||||
static void window_ride_construction_select_map_tiles(Ride *ride, sint32 trackType, sint32 trackDirection, sint32 x, sint32 y)
|
||||
{
|
||||
// If the scenery tool is active, we do not display our tiles as it
|
||||
// will conflict with larger scenery objects selecting tiles
|
||||
if (scenery_tool_is_active())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const rct_preview_track *trackBlock;
|
||||
sint32 offsetX, offsetY;
|
||||
|
||||
|
||||
@@ -1655,8 +1655,11 @@ void ride_select_next_section()
|
||||
if (track_block_get_next(&inputElement, &outputElement, &z, &direction)) {
|
||||
x = outputElement.x;
|
||||
y = outputElement.y;
|
||||
map_set_virtual_floor_height(tileElement->base_height << 3);
|
||||
tileElement = outputElement.element;
|
||||
if (!scenery_tool_is_active())
|
||||
{
|
||||
map_set_virtual_floor_height(tileElement->base_height << 3);
|
||||
}
|
||||
} else {
|
||||
_rideConstructionState = RIDE_CONSTRUCTION_STATE_FRONT;
|
||||
_currentTrackBeginX = outputElement.x;
|
||||
@@ -1714,7 +1717,10 @@ void ride_select_previous_section()
|
||||
_currentTrackPieceType = track_element_get_type(trackBeginEnd.begin_element);
|
||||
_currentTrackSelectionFlags = 0;
|
||||
_rideConstructionArrowPulseTime = 0;
|
||||
map_set_virtual_floor_height(trackBeginEnd.end_element->base_height << 3);
|
||||
if (!scenery_tool_is_active())
|
||||
{
|
||||
map_set_virtual_floor_height(trackBeginEnd.begin_element->base_height << 3);
|
||||
}
|
||||
window_ride_construction_update_active_elements();
|
||||
} else {
|
||||
_rideConstructionState = RIDE_CONSTRUCTION_STATE_BACK;
|
||||
|
||||
Reference in New Issue
Block a user