Fix crash in LegoAnimationManager::FUN_100609f0

I've come across an issue where the game will crash when you try to play two animations at once. Making a PR here since I don't think this happens on win32, however I can't test because I'm on Linux and Wine doesn't really like Lego Island.

Hopefully this is the "correct" fix, I haven't had crashing after applying the fix.

Signed-off-by: kernaltrap <kernaltrap@gmail.com>
This commit is contained in:
kernaltrap 2025-05-27 19:02:29 -05:00
parent 6bbddf5508
commit aaa4bd05f6
No known key found for this signature in database
GPG Key ID: EB4ED0175E6CB025

View File

@ -1081,7 +1081,9 @@ MxResult LegoAnimationManager::FUN_100609f0(MxU32 p_objectId, MxMatrix* p_matrix
char buf[256]; char buf[256];
sprintf(buf, "%s:%d", g_strANIMMAN_ID, info->m_index); sprintf(buf, "%s:%d", g_strANIMMAN_ID, info->m_index);
if (m_worldId != LegoOmni::e_undefined) {
action.SetAtomId(*Lego()->GetWorldAtom(m_worldId)); action.SetAtomId(*Lego()->GetWorldAtom(m_worldId));
}
action.SetObjectId(p_objectId); action.SetObjectId(p_objectId);
action.SetUnknown24(-1); action.SetUnknown24(-1);
action.AppendExtra(strlen(buf) + 1, buf); action.AppendExtra(strlen(buf) + 1, buf);