From 863892391dc15bc49e3a95d65192bc3b7fc5ce8c Mon Sep 17 00:00:00 2001 From: leoleotte <5093266+leoleotte@users.noreply.github.com> Date: Sat, 6 Aug 2022 10:42:07 -0300 Subject: [PATCH] Fix #17600: Notifications aren't cleared on park load (#17705) When loading a save using the New Save Format (.park files), the notification (news) list is not properly terminated and is preserving previously loaded news from other save files, including the main menu ones. --- distribution/changelog.txt | 1 + src/openrct2/park/ParkFile.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 2ee7a2fd4c..9bcd94cf3a 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -27,6 +27,7 @@ - Fix: [#17542] Stalls will autorotate towards paths outside the park. - Fix: [#17553] Crash when moving invention list items to empty list. - Fix: [#17571] All researched tracked rides show up as new vehicles in .park scenarios. +- Fix: [#17600] Notifications are not properly cleared when loading a park. - Fix: [#17605] Crash when opening parks which have had objects removed externally. - Fix: [#17639] When building upside down, the special elements list contains many items twice (original bug). diff --git a/src/openrct2/park/ParkFile.cpp b/src/openrct2/park/ParkFile.cpp index 871c5406af..0499dfcb3d 100644 --- a/src/openrct2/park/ParkFile.cpp +++ b/src/openrct2/park/ParkFile.cpp @@ -927,6 +927,10 @@ namespace OpenRCT2 { gNewsItems[offset + i] = archived[i]; } + + // Still need to set the correct type to properly terminate the queue + if (archived.size() < News::MaxItemsArchive) + gNewsItems[offset + archived.size()].Type = News::ItemType::Null; } else {