From 6450774aa7d95d6d86936de8cb4690cadce348b3 Mon Sep 17 00:00:00 2001 From: Nathan M Gilbert Date: Fri, 5 Apr 2024 11:20:30 -0400 Subject: [PATCH] Implement/Match LegoExtraActor::VTable0xc4 (#771) * Implement/Match LegoExtraActor::VTable0xc4 * Style --------- Co-authored-by: Christian Semmler --- LEGO1/lego/legoomni/src/paths/legoextraactor.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/LEGO1/lego/legoomni/src/paths/legoextraactor.cpp b/LEGO1/lego/legoomni/src/paths/legoextraactor.cpp index 07a65f73..2d3726be 100644 --- a/LEGO1/lego/legoomni/src/paths/legoextraactor.cpp +++ b/LEGO1/lego/legoomni/src/paths/legoextraactor.cpp @@ -397,9 +397,23 @@ void LegoExtraActor::SetWorldSpeed(MxFloat p_worldSpeed) LegoAnimActor::SetWorldSpeed(p_worldSpeed); } -// STUB: LEGO1 0x1002b630 +// FUNCTION: LEGO1 0x1002b630 void LegoExtraActor::VTable0xc4() { + if (m_curAnim != 0) { + return; + } + + if (m_worldSpeed > -0.001 || m_worldSpeed < 0.001) { + MxU16 name = *((MxU16*) m_roi->GetName()); + MxBool b = name == TWOCC('m', 'a') || name == TWOCC('p', 'a'); + + if (b) { + float duration = m_animMaps[m_curAnim]->GetDuration(); + MxMatrix matrix(m_unk0xec); + LegoAnimActor::FUN_1001c360(duration, matrix); + } + } } // FUNCTION: LEGO1 0x1002b6f0