1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 15:24:30 +01:00

Fix #7002: Always invalidate virtual floor regardless of selection.

This commit is contained in:
ZehMatt
2018-03-03 12:34:27 +01:00
committed by Aaron van Geffen
parent 72114ec6e8
commit fdf7adecd9
3 changed files with 12 additions and 15 deletions

View File

@@ -1653,6 +1653,10 @@ void ride_select_next_section()
window_ride_construction_update_active_elements();
return;
}
// Invalidate previous track piece (we may not be changing height!)
map_invalidate_virtual_floor_tiles();
CoordsXYE inputElement, outputElement;
inputElement.x = x;
inputElement.y = y;
@@ -1663,9 +1667,6 @@ void ride_select_next_section()
tileElement = outputElement.element;
if (!scenery_tool_is_active())
{
// Invalidate previous track piece (we may not be changing height!)
map_invalidate_virtual_floor_tiles();
// Set next element's height.
map_set_virtual_floor_height(tileElement->base_height << 3);
}
@@ -1717,6 +1718,10 @@ void ride_select_previous_section()
window_ride_construction_update_active_elements();
return;
}
// Invalidate previous track piece (we may not be changing height!)
map_invalidate_virtual_floor_tiles();
track_begin_end trackBeginEnd;
if (track_block_get_previous(x, y, tileElement, &trackBeginEnd)) {
_currentTrackBeginX = trackBeginEnd.begin_x;
@@ -1728,9 +1733,6 @@ void ride_select_previous_section()
_rideConstructionArrowPulseTime = 0;
if (!scenery_tool_is_active())
{
// Invalidate previous track piece (we may not be changing height!)
map_invalidate_virtual_floor_tiles();
// Set previous element's height.
map_set_virtual_floor_height(trackBeginEnd.begin_element->base_height << 3);
}