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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user