diff --git a/distribution/changelog.txt b/distribution/changelog.txt index bffd5a5728..4d3b3dc898 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -3,6 +3,7 @@ - Feature: [#18537] Add shift/control modifiers to window close buttons, closing all but the given window or all windows of the same type, respectively. - Feature: [#18732] [Plugin] API to get the guests thoughts. - Feature: [#18744] Cheat to allow using a regular path as a queue path. +- Improved: [#18749] Ability to have 4 active awards for more than one month in a row. - Improved: [#18826] [Plugin] Added all actions and their documentation to plugin API. - 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/Award.cpp b/src/openrct2/management/Award.cpp index 99a2eb3c8e..28af4c8c71 100644 --- a/src/openrct2/management/Award.cpp +++ b/src/openrct2/management/Award.cpp @@ -606,6 +606,20 @@ void award_update_all() { PROFILED_FUNCTION(); + // Decrease award times + for (auto& award : _currentAwards) + { + --award.Time; + } + // Remove any 0 time awards + auto res = std::remove_if( + std::begin(_currentAwards), std::end(_currentAwards), [](const Award& award) { return award.Time == 0; }); + if (res != std::end(_currentAwards)) + { + _currentAwards.erase(res, std::end(_currentAwards)); + window_invalidate_by_class(WindowClass::ParkInformation); + } + // Only add new awards if park is open if (gParkFlags & PARK_FLAGS_PARK_OPEN) { @@ -639,19 +653,4 @@ void award_update_all() } } } - - // Decrease award times - for (auto& award : _currentAwards) - { - --award.Time; - } - - // Remove any 0 time awards - auto res = std::remove_if( - std::begin(_currentAwards), std::end(_currentAwards), [](const Award& award) { return award.Time == 0; }); - if (res != std::end(_currentAwards)) - { - _currentAwards.erase(res, std::end(_currentAwards)); - window_invalidate_by_class(WindowClass::ParkInformation); - } }