1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-27 00:34:46 +01:00

Fix #21870: Demolishing flat ride in pause mode allows copies

This commit is contained in:
Michael Steenbeek
2024-04-30 13:50:04 +02:00
committed by GitHub
parent 575cd756b3
commit 44c442f832
2 changed files with 8 additions and 8 deletions

View File

@@ -9,6 +9,7 @@
- Change: [#21855] Cheats menu dropdown no longer requires dragging.
- Fix: [#866] Boat Hire boats get stuck entering track.
- Fix: [#10701] No reason specified when placing door over unsuitable track.
- Fix: [#18723, #21870] Attempting to demolish a flat ride in pause mode allows you to place multiple copies.
- Fix: [#19559] Custom rides with long descriptions extend into lower widgets.
- Fix: [#21696] Fullscreen window option not correctly applied on macOS.
- Fix: [#21787] Map generator heightmap should respect increased height limits.

View File

@@ -2357,14 +2357,6 @@ static Widget _rideConstructionWidgets[] = {
const PreviewTrack* trackBlock = ted.Block;
newCoords->z = (tileElement->GetBaseZ()) - trackBlock->z;
_gotoStartPlacementMode = true;
// When flat rides are deleted, the window should be reset so the currentRide can be placed again.
auto currentRide = GetRide(_currentRideIndex);
const auto& rtd = currentRide->GetRideTypeDescriptor();
if (rtd.HasFlag(RIDE_TYPE_FLAG_FLAT_RIDE) && !rtd.HasFlag(RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY))
{
RideInitialiseConstructionWindow(*currentRide);
}
}
auto trackRemoveAction = TrackRemoveAction(
@@ -2381,6 +2373,13 @@ static Widget _rideConstructionWidgets[] = {
auto currentRide = GetRide(_currentRideIndex);
if (currentRide != nullptr)
{
// When flat rides are deleted, the window should be reset so the currentRide can be placed again.
const auto& rtd = currentRide->GetRideTypeDescriptor();
if (rtd.HasFlag(RIDE_TYPE_FLAG_FLAT_RIDE) && !rtd.HasFlag(RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY))
{
RideInitialiseConstructionWindow(*currentRide);
}
WindowRideConstructionMouseUpDemolishNextPiece({ *newCoords, static_cast<Direction>(direction) }, type);
}
}