From bc6627868636ca63c96c33d56082af8220a5ab89 Mon Sep 17 00:00:00 2001 From: Dio <43355832+cbergeron1@users.noreply.github.com> Date: Sun, 12 Jan 2025 06:35:34 -0500 Subject: [PATCH] Fix #23368: Incorrect refund when deleting track >= 96m --- distribution/changelog.txt | 1 + src/openrct2/actions/TrackRemoveAction.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 525557976e..f5024e7c39 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -6,6 +6,7 @@ - Change: [#23328] All RCT2 entertainer costumes are now available in legacy parks. - Fix: [#1479] Incorrect values provided by the in game console “get location” command. - Fix: [#21794] Lay-down coaster cars reverse on first frames of downwards corkscrew. +- Fix: [#23368] Incorrect refund amount when deleting track pieces at or above 96m. - Fix: [#23508] Simultaneous virtual floors shown for ride and footpath. - Fix: [#23581] [Plugin] Food/drink items given to guests have no consumption duration set. - Fix: [#23591] “Install new track” button in Track Designs Manager is misaligned. diff --git a/src/openrct2/actions/TrackRemoveAction.cpp b/src/openrct2/actions/TrackRemoveAction.cpp index 694b837491..5191487256 100644 --- a/src/openrct2/actions/TrackRemoveAction.cpp +++ b/src/openrct2/actions/TrackRemoveAction.cpp @@ -234,7 +234,7 @@ GameActions::Result TrackRemoveAction::Query() const GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_ERR_SURFACE_ELEMENT_NOT_FOUND); } - int8_t _support_height = tileElement->BaseHeight - surfaceElement->BaseHeight; + int16_t _support_height = tileElement->BaseHeight - surfaceElement->BaseHeight; if (_support_height < 0) { _support_height = 10; @@ -410,7 +410,7 @@ GameActions::Result TrackRemoveAction::Execute() const GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_ERR_SURFACE_ELEMENT_NOT_FOUND); } - int8_t _support_height = tileElement->BaseHeight - surfaceElement->BaseHeight; + int16_t _support_height = tileElement->BaseHeight - surfaceElement->BaseHeight; if (_support_height < 0) { _support_height = 10;