From 174d638d1da19687f2f21a400fe53a3e77342669 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sun, 11 Dec 2022 23:00:51 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20#6341:=20=E2=80=9CUnlock=20vehicle=20limi?= =?UTF-8?q?ts=E2=80=9D=20doesn=E2=80=99t=20work=20for=20setting=20fewer=20?= =?UTF-8?q?cpt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- distribution/changelog.txt | 1 + src/openrct2-ui/windows/Ride.cpp | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 6b3cdca286..a1b2aa506c 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -25,6 +25,7 @@ - Change: [#18381] Convert custom invisible paths to the built-in ones. - Change: [OpenSFX#11, OpenMusic#19] First implementation of official replacement asset packs for sound effects & music. - Fix: [#1519] “See-through rides” doesn't affect all rides (original bug). +- Fix: [#6341] “Unlock vehicle limits” does not allow setting fewer vehicles than the vehicle type requires. - Fix: [#14312] Research ride type message incorrect. - Fix: [#14425] Ride ratings do not skip unallocated ride ids. - Fix: [#15969] Guests heading for ride use vanilla behaviour diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index b59f0fef57..8a59c277d5 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -2676,8 +2676,7 @@ static void WindowRideVehicleMousedown(rct_window* w, WidgetIndex widgetIndex, r ride->SetNumCarsPerVehicle(ride->num_cars_per_train + 1); break; case WIDX_VEHICLE_CARS_PER_TRAIN_DECREASE: - rct_ride_entry* rideEntry = ride->GetRideEntry(); - if (ride->num_cars_per_train > rideEntry->zero_cars + 1) + if (ride->num_cars_per_train > 1) ride->SetNumCarsPerVehicle(ride->num_cars_per_train - 1); break; }