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

Fix track construction arrow position when removing track pieces

This commit is contained in:
mix
2025-11-22 23:21:14 +00:00
committed by GitHub
parent fc9e14caa8
commit 83591cf94e
2 changed files with 12 additions and 11 deletions

View File

@@ -1,5 +1,6 @@
0.4.30 (in development)
------------------------------------------------------------------------
- Fix: [#25524] The track construction arrow does not immediately change position when deleting track pieces.
0.4.29 (2025-11-22)
------------------------------------------------------------------------

View File

@@ -3261,6 +3261,15 @@ namespace OpenRCT2::Ui::Windows
rideIndex, type, direction, liftHillAndAlternativeState, trackPos);
WindowRideConstructionUpdateActiveElements();
gMapSelectArrowPosition = _currentTrackBegin;
Direction arrowDirection = _currentTrackPieceDirection;
// diagonal pieces trigger this
if (arrowDirection >= 4)
arrowDirection += 4;
if (_rideConstructionState == RideConstructionState::Back)
arrowDirection = DirectionReverse(arrowDirection);
gMapSelectArrowDirection = arrowDirection;
if (!(gMapSelectFlags.has(MapSelectFlag::enable)))
{
// Set height to where the next track piece would begin
@@ -3275,20 +3284,11 @@ namespace OpenRCT2::Ui::Windows
_rideConstructionNextArrowPulse = curTime + kArrowPulseDuration;
_currentTrackSelectionFlags.flip(TrackSelectionFlag::arrow);
trackPos = _currentTrackBegin;
direction = _currentTrackPieceDirection;
type = _currentTrackPieceType;
// diagonal pieces trigger this
if (direction >= 4)
direction += 4;
if (_rideConstructionState == RideConstructionState::Back)
direction = DirectionReverse(direction);
gMapSelectArrowPosition = trackPos;
gMapSelectArrowDirection = direction;
gMapSelectFlags.unset(MapSelectFlag::enableArrow);
if (_currentTrackSelectionFlags.has(TrackSelectionFlag::arrow))
gMapSelectFlags.set(MapSelectFlag::enableArrow);
MapInvalidateTileFull(trackPos);
MapInvalidateTileFull(_currentTrackBegin);
break;
}
case RideConstructionState::Selected: