diff --git a/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp b/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp index 1becbad4..d501e191 100644 --- a/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp @@ -10,6 +10,7 @@ #include "mxactionnotificationparam.h" #include "mxautolocker.h" #include "mxdsactionlist.h" +#include "mxdsmediaaction.h" #include "mxdsmultiaction.h" #include "mxnotificationmanager.h" #include "mxobjectfactory.h" @@ -145,9 +146,27 @@ void LegoWorldPresenter::StartingTickle() ProgressTickleState(TickleState_Streaming); } -// STUB: LEGO1 0x10067a70 +// FUNCTION: LEGO1 0x10067a70 void LegoWorldPresenter::VTable0x60(MxPresenter* p_presenter) { + MxCompositePresenter::VTable0x60(p_presenter); + MxDSAction* action = p_presenter->GetAction(); + + if (action->GetDuration() != -1 && (action->GetFlags() & MxDSAction::Flag_Looping) == 0) { + if (!action->IsA("MxDSMediaAction")) { + return; + } + + if (((MxDSMediaAction*) action)->GetSustainTime() != -1) { + return; + } + } + + if (!p_presenter->IsA("LegoAnimPresenter") && !p_presenter->IsA("MxControlPresenter") && + !p_presenter->IsA("MxCompositePresenter")) { + p_presenter->SendToCompositePresenter(Lego()); + ((LegoWorld*) m_entity)->VTable0x58(p_presenter); + } } // STUB: LEGO1 0x10067b00 diff --git a/LEGO1/omni/include/mxpresenter.h b/LEGO1/omni/include/mxpresenter.h index 55682f11..eddcc4f2 100644 --- a/LEGO1/omni/include/mxpresenter.h +++ b/LEGO1/omni/include/mxpresenter.h @@ -116,6 +116,7 @@ class MxPresenter : public MxCore { __declspec(dllexport) virtual void Enable(MxBool p_enable); // vtable+0x54 MxEntity* CreateEntity(const char* p_name); + void SendToCompositePresenter(MxOmni*); MxBool IsEnabled(); inline MxS32 GetCurrentTickleState() const { return this->m_currentTickleState; } @@ -130,7 +131,6 @@ class MxPresenter : public MxCore { protected: __declspec(dllexport) void Init(); - void SendToCompositePresenter(MxOmni*); TickleState m_currentTickleState; // 0x8 MxU32 m_previousTickleStates; // 0x0c