mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix #7002: Always invalidate virtual floor regardless of selection.
This commit is contained in:
parent
72114ec6e8
commit
fdf7adecd9
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -746,11 +746,11 @@ money32 footpath_provisional_set(sint32 type, sint32 x, sint32 y, sint32 z, sint
|
|||
}
|
||||
}
|
||||
|
||||
if (!scenery_tool_is_active())
|
||||
{
|
||||
// Invalidate previous footpath piece.
|
||||
map_invalidate_virtual_floor_tiles();
|
||||
|
||||
if (!scenery_tool_is_active())
|
||||
{
|
||||
if (cost == MONEY32_UNDEFINED)
|
||||
{
|
||||
// If we can't build this, don't show a virtual floor.
|
||||
|
|
|
@ -4819,11 +4819,6 @@ void map_invalidate_virtual_floor_tiles()
|
|||
}
|
||||
}
|
||||
|
||||
// Do not invalidate if we're between ticks.
|
||||
if (min_position.x == std::numeric_limits<sint16>::max() || min_position.y == std::numeric_limits<sint16>::max() ||
|
||||
max_position.x == std::numeric_limits<sint16>::lowest() || max_position.y == std::numeric_limits<sint16>::lowest())
|
||||
return;
|
||||
|
||||
// Apply the virtual floor size to the computed invalidation area.
|
||||
min_position.x -= gMapVirtualFloorBaseSize + 1;
|
||||
min_position.y -= gMapVirtualFloorBaseSize + 1;
|
||||
|
|
Loading…
Reference in New Issue