From 1ff192b8a085d8182f1929663a9f599c5e00ba0f Mon Sep 17 00:00:00 2001 From: Sjoerd de Bruin Date: Wed, 23 Oct 2024 11:24:14 +0200 Subject: [PATCH] Fix #23044: "remove_unused_objects" command causes blank peep names --- distribution/changelog.txt | 1 + src/openrct2/EditorObjectSelectionSession.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 8ccca2f605..04d58c3dcb 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -10,6 +10,7 @@ - Fix: [#23009] Scenarios from RCT Classic (.sea files) are not included in the scenario index. - Fix: [#23015] Crash when loading a save game when the construction window is still open. - Fix: [#23023] Large scenery clearance height interpreted as negative when greater than 127. +- Fix: [#23044] "remove_unused_objects" command causes blank peep names. 0.4.15 (2024-10-06) ------------------------------------------------------------------------ diff --git a/src/openrct2/EditorObjectSelectionSession.cpp b/src/openrct2/EditorObjectSelectionSession.cpp index 292e2a5ed2..ad049d6efa 100644 --- a/src/openrct2/EditorObjectSelectionSession.cpp +++ b/src/openrct2/EditorObjectSelectionSession.cpp @@ -707,6 +707,10 @@ int32_t EditorRemoveUnusedObjects() if (objectType == ObjectType::Water) continue; + // Avoid the used peep names object being deleted as no in-use checks are performed. + if (objectType == ObjectType::PeepNames) + continue; + // It’s hard to determine exactly if a scenery group is used, so do not remove these automatically. if (objectType == ObjectType::SceneryGroup) continue;