From dfb2c3fa605095269fd999a879f9784c88b45475 Mon Sep 17 00:00:00 2001 From: kyphii <8711258+kyphii@users.noreply.github.com> Date: Mon, 13 Feb 2023 16:30:47 -0500 Subject: [PATCH] Fix #17996 - Finances window not cleared when starting some .park scenarios (#19368) * Clear Finances Graph on Scenario Load * Update changelog --------- Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com> --- distribution/changelog.txt | 1 + src/openrct2/management/Finance.cpp | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 444c27998d..5a4a42a476 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -25,6 +25,7 @@ - Change: [#19091] [Plugin] Add game action information to callback arguments of custom actions. - Change: [#19233] Reduce lift speed minimum and maximum values for “Classic Wooden Coaster”. - Fix: [#474] Mini golf window shows more players than there actually are (original bug). +- Fix: [#17996] Finances window not cleared when starting some .park scenarios - Fix: [#18260] Crash opening parks that have multiple tiles referencing the same banner entry. - Fix: [#18467] “Selected only” Object Selection filter is active in Track Designs Manager, and cannot be toggled. - Fix: [#18905] Ride Construction window theme is not applied correctly. diff --git a/src/openrct2/management/Finance.cpp b/src/openrct2/management/Finance.cpp index 13620b516a..43aedf331f 100644 --- a/src/openrct2/management/Finance.cpp +++ b/src/openrct2/management/Finance.cpp @@ -196,6 +196,14 @@ void FinanceResetHistory() gWeeklyProfitHistory[i] = MONEY64_UNDEFINED; gParkValueHistory[i] = MONEY64_UNDEFINED; } + + for (uint32_t i = 0; i < EXPENDITURE_TABLE_MONTH_COUNT; ++i) + { + for (uint32_t j = 0; j < static_cast(ExpenditureType::Count); ++j) + { + gExpenditureTable[i][j] = 0; + } + } } /**