From 752f15a363900fec3eed3069a765172d82b928d7 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Wed, 11 Dec 2024 16:09:59 +0100 Subject: [PATCH] Force use of all costumes if noRandomPlacement results in no costumes --- src/openrct2/peep/PeepAnimations.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/openrct2/peep/PeepAnimations.cpp b/src/openrct2/peep/PeepAnimations.cpp index 3ec83aa508..7c669d8aa9 100644 --- a/src/openrct2/peep/PeepAnimations.cpp +++ b/src/openrct2/peep/PeepAnimations.cpp @@ -171,7 +171,14 @@ namespace OpenRCT2 ObjectEntryIndex findRandomPeepAnimationsIndexForType(const AnimationPeepType type) { + // Get available costumes, excluding from random placement as requested auto costumes = findAllPeepAnimationsIndexesForType(type, true); + + // No costumes? Try again without respecting the random placement flag + if (costumes.empty()) + costumes = findAllPeepAnimationsIndexesForType(type); + + // Still no costumes available? Bail out if (costumes.empty()) return OBJECT_ENTRY_INDEX_NULL;