1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 21:43:06 +01:00

Force use of all costumes if noRandomPlacement results in no costumes

This commit is contained in:
Aaron van Geffen
2024-12-11 16:09:59 +01:00
parent 4f1a7c72aa
commit 752f15a363

View File

@@ -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;