From b367f74496139db85b181c0118e01444c098fbda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Sun, 29 Aug 2021 13:20:30 -0700 Subject: [PATCH] Fix #15199: Construction window is not closed when a ride gets demolished --- distribution/changelog.txt | 1 + src/openrct2/actions/RideDemolishAction.cpp | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index b512a644dc..564b7fc02b 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -16,6 +16,7 @@ - Fix: [#15170] Plugin: incorrect label text alignment. - Fix: [#15184] Crash when hovering over water types in Object Selection. - Fix: [#15193] Crash when rides/stalls are demolished. +- Fix: [#15199] Construction window is not closed when a ride gets demolished. - Fix: [#15255] Tile Inspector shows banner information on walls that do not contain one. - Fix: [#15289] Unexpected behavior with duplicated banners which also caused desyncs in multiplayer. - Improved: [#3417] Crash dumps are now placed in their own folder. diff --git a/src/openrct2/actions/RideDemolishAction.cpp b/src/openrct2/actions/RideDemolishAction.cpp index 3add2042dc..ecc24ea6ce 100644 --- a/src/openrct2/actions/RideDemolishAction.cpp +++ b/src/openrct2/actions/RideDemolishAction.cpp @@ -157,10 +157,7 @@ GameActions::Result::Ptr RideDemolishAction::DemolishRide(Ride* ride) const gParkValue = GetContext()->GetGameState()->GetPark().CalculateParkValue(); // Close windows related to the demolished ride - if (!(GetFlags() & GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED)) - { - window_close_by_number(WC_RIDE_CONSTRUCTION, _rideIndex); - } + window_close_by_number(WC_RIDE_CONSTRUCTION, _rideIndex); window_close_by_number(WC_RIDE, _rideIndex); window_close_by_number(WC_DEMOLISH_RIDE_PROMPT, _rideIndex); window_close_by_class(WC_NEW_CAMPAIGN);