1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Merge pull request #25387 from Gymnasiast/fix/25359

Fix #25359: No preview when hovering on sloped land in path drag mode
This commit is contained in:
Michael Steenbeek
2025-10-22 09:51:01 +02:00
committed by GitHub

View File

@@ -1193,6 +1193,7 @@ namespace OpenRCT2::Ui::Windows
{
return;
}
_provisionalFootpath.tiles.clear();
auto mapPos = FootpathGetPlacePositionFromScreenPosition(screenCoords);
if (!mapPos)
@@ -1256,24 +1257,7 @@ namespace OpenRCT2::Ui::Windows
if (isLeftMousePressed)
return;
MapInvalidateSelectionRect();
gMapSelectFlags.unset(MapSelectFlag::enableArrow);
auto mapPos = FootpathGetPlacePositionFromScreenPosition(screenCoords);
if (!mapPos)
{
gMapSelectFlags.unset(MapSelectFlag::enable);
return;
}
auto placement = WindowFootpathGetPlacementFromScreenCoords(screenCoords);
// Set map selection
gMapSelectFlags.set(MapSelectFlag::enable);
gMapSelectType = MapSelectType::full;
setMapSelectRange(*mapPos);
WindowFootpathSetProvisionalPathDragArea(getMapSelectRange(), placement.baseZ);
WindowFootpathSetProvisionalPathAtPoint(screenCoords);
}
void WindowFootpathPlacePath()