From 3c624ff14cacf0ba355046fb5c0c34a52c90c3a2 Mon Sep 17 00:00:00 2001 From: jonschz <17198703+jonschz@users.noreply.github.com> Date: Tue, 3 Dec 2024 19:12:05 +0100 Subject: [PATCH] Implement `Act2Actor::VTable0x9c()` (#1186) Co-authored-by: jonschz --- LEGO1/lego/legoomni/src/actors/act2actor.cpp | 23 +++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/LEGO1/lego/legoomni/src/actors/act2actor.cpp b/LEGO1/lego/legoomni/src/actors/act2actor.cpp index d38ee3d1..1ddb4b3d 100644 --- a/LEGO1/lego/legoomni/src/actors/act2actor.cpp +++ b/LEGO1/lego/legoomni/src/actors/act2actor.cpp @@ -91,11 +91,28 @@ MxResult Act2Actor::VTable0x94(LegoPathActor*, MxBool) return SUCCESS; } -// STUB: LEGO1 0x10018a20 +// FUNCTION: LEGO1 0x10018a20 MxResult Act2Actor::VTable0x9c() { - // TODO - return SUCCESS; + if (m_grec && !(m_grec->m_flags & LegoPathEdgeContainer::c_bit1)) { + delete m_grec; + m_grec = NULL; + return SUCCESS; + } + else { + if (m_unk0x1f) { + MxMatrix matrix = m_roi->GetLocal2World(); + matrix[3][1] -= 3.0f; + m_roi->UpdateTransformationRelativeToParent(matrix); + + LegoROI* brickstrROI = FindROI("brickstr"); + MxMatrix brickstrMatrix = brickstrROI->GetLocal2World(); + brickstrMatrix[3][1] -= 3.0f; + brickstrROI->UpdateTransformationRelativeToParent(brickstrMatrix); + } + + return LegoPathActor::VTable0x9c(); + } } // STUB: LEGO1 0x10018c30