Add new idle animations and emotes, fix root ROI duplication

Add 3 idle styles (Wobbly, Peppy, Brickster) and 3 emotes
(Look Around, Headless, Toss). Fix AssignROIIndices to only
let the first root-mapped node claim the root ROI, preventing
prop nodes (e.g. *POPMUG01) from hiding the player via morph keys.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Christian Semmler 2026-03-13 16:51:55 -07:00
parent a588e3bb67
commit 0de220644b
No known key found for this signature in database
GPG Key ID: 086DAA1360BEEE5C
2 changed files with 15 additions and 4 deletions

View File

@ -21,6 +21,9 @@ const char* const g_idleAnimNames[] = {
"CNs008xx", // 0: Sway (default) "CNs008xx", // 0: Sway (default)
"CNs009xx", // 1: Groove "CNs009xx", // 1: Groove
"CNs010xx", // 2: Excited "CNs010xx", // 2: Excited
"CNs008Pa", // 3: Wobbly
"CNs009Pa", // 4: Peppy
"CNs012Br", // 5: Brickster
}; };
const int g_idleAnimCount = sizeof(g_idleAnimNames) / sizeof(g_idleAnimNames[0]); const int g_idleAnimCount = sizeof(g_idleAnimNames) / sizeof(g_idleAnimNames[0]);
@ -30,6 +33,9 @@ const EmoteEntry g_emoteEntries[] = {
{{{"CNs011xx", nullptr}, {nullptr, nullptr}}}, // 0: Wave (one-shot) {{{"CNs011xx", nullptr}, {nullptr, nullptr}}}, // 0: Wave (one-shot)
{{{"CNs012xx", nullptr}, {nullptr, nullptr}}}, // 1: Hat Tip (one-shot) {{{"CNs012xx", nullptr}, {nullptr, nullptr}}}, // 1: Hat Tip (one-shot)
{{{"BNsDis01", "crash5"}, {"BNsAss01", nullptr}}}, // 2: Disassemble / Reassemble (multi-part) {{{"BNsDis01", "crash5"}, {"BNsAss01", nullptr}}}, // 2: Disassemble / Reassemble (multi-part)
{{{"CNs008Br", nullptr}, {nullptr, nullptr}}}, // 3: Look Around (one-shot)
{{{"CNs014Br", nullptr}, {nullptr, nullptr}}}, // 4: Headless (one-shot)
{{{"CNs013Pa", nullptr}, {nullptr, nullptr}}}, // 5: Toss (one-shot)
}; };
const int g_emoteAnimCount = sizeof(g_emoteEntries) / sizeof(g_emoteEntries[0]); const int g_emoteAnimCount = sizeof(g_emoteEntries) / sizeof(g_emoteEntries[0]);

View File

@ -19,7 +19,8 @@ static void AssignROIIndices(
LegoROI* p_rootROI, LegoROI* p_rootROI,
LegoROI* p_extraROI, LegoROI* p_extraROI,
MxU32& p_nextIndex, MxU32& p_nextIndex,
std::vector<LegoROI*>& p_entries std::vector<LegoROI*>& p_entries,
bool& p_rootClaimed
) )
{ {
LegoROI* roi = p_parentROI; LegoROI* roi = p_parentROI;
@ -31,7 +32,10 @@ static void AssignROIIndices(
if (*name == '*' || p_parentROI == nullptr) { if (*name == '*' || p_parentROI == nullptr) {
roi = p_rootROI; roi = p_rootROI;
if (!p_rootClaimed) {
matchedROI = p_rootROI; matchedROI = p_rootROI;
p_rootClaimed = true;
}
} }
else { else {
matchedROI = p_parentROI->FindChildROI(name, p_parentROI); matchedROI = p_parentROI->FindChildROI(name, p_parentROI);
@ -51,7 +55,7 @@ static void AssignROIIndices(
} }
for (MxS32 i = 0; i < p_node->GetNumChildren(); i++) { for (MxS32 i = 0; i < p_node->GetNumChildren(); i++) {
AssignROIIndices(p_node->GetChild(i), roi, p_rootROI, p_extraROI, p_nextIndex, p_entries); AssignROIIndices(p_node->GetChild(i), roi, p_rootROI, p_extraROI, p_nextIndex, p_entries, p_rootClaimed);
} }
} }
@ -74,7 +78,8 @@ void AnimUtils::BuildROIMap(
MxU32 nextIndex = 1; MxU32 nextIndex = 1;
std::vector<LegoROI*> entries; std::vector<LegoROI*> entries;
AssignROIIndices(root, nullptr, p_rootROI, p_extraROI, nextIndex, entries); bool rootClaimed = false;
AssignROIIndices(root, nullptr, p_rootROI, p_extraROI, nextIndex, entries, rootClaimed);
if (entries.empty()) { if (entries.empty()) {
return; return;