diff --git a/src/openrct2/object/PeepAnimationsObject.cpp b/src/openrct2/object/PeepAnimationsObject.cpp index c998122b92..8264b37ab6 100644 --- a/src/openrct2/object/PeepAnimationsObject.cpp +++ b/src/openrct2/object/PeepAnimationsObject.cpp @@ -77,6 +77,23 @@ void PeepAnimationsObject::ReadJson(IReadObjectContext* context, json_t& root) { if (!groupJson["animations"].contains(typeStr)) { + // Successive animation groups can copy the basic animations from the primary group + if (!_animationGroups.empty()) + { + auto& referenceAnim = _animationGroups[0][typeEnum]; + if (referenceAnim.imageTableOffset != 0) + { + LOG_VERBOSE("Copying animation '%s' from primary group", typeStr); + std::vector sequence = referenceAnim.frame_offsets; + group[typeEnum] = { + .imageTableOffset = referenceAnim.imageTableOffset, + .frame_offsets = sequence, + }; + continue; + } + } + + // No primary animation bail us out -- error here! LOG_ERROR("Required animation does not exist: %s", typeStr); continue; }