diff --git a/LEGO1/lego/legoomni/include/legopathcontroller.h b/LEGO1/lego/legoomni/include/legopathcontroller.h index 01094fe6..5e3bd8ae 100644 --- a/LEGO1/lego/legoomni/include/legopathcontroller.h +++ b/LEGO1/lego/legoomni/include/legopathcontroller.h @@ -138,6 +138,9 @@ public: MxFloat& p_param5 ); + // FUNCTION: BETA10 0x100e0160 + MxBool ActorExists(LegoPathActor* p_actor) { return m_actors.find(p_actor) == m_actors.end() ? FALSE : TRUE; } + static MxResult Init(); static MxResult Reset(); diff --git a/LEGO1/lego/legoomni/include/legoworld.h b/LEGO1/lego/legoomni/include/legoworld.h index cdb67e4a..d7dc4671 100644 --- a/LEGO1/lego/legoomni/include/legoworld.h +++ b/LEGO1/lego/legoomni/include/legoworld.h @@ -101,6 +101,7 @@ public: Vector3& p_direction ); void RemoveActor(LegoPathActor* p_actor); + MxBool ActorExists(LegoPathActor* p_actor); void FUN_1001fda0(LegoAnimPresenter* p_presenter); void FUN_1001fe90(LegoAnimPresenter* p_presenter); LegoPathBoundary* FindPathBoundary(const char* p_name); diff --git a/LEGO1/lego/legoomni/src/entity/legoworld.cpp b/LEGO1/lego/legoomni/src/entity/legoworld.cpp index 0781c4b3..b49df6c3 100644 --- a/LEGO1/lego/legoomni/src/entity/legoworld.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoworld.cpp @@ -334,6 +334,21 @@ void LegoWorld::RemoveActor(LegoPathActor* p_actor) } } +// FUNCTION: BETA10 0x100da560 +MxBool LegoWorld::ActorExists(LegoPathActor* p_actor) +{ + LegoPathControllerListCursor cursor(&m_list0x68); + LegoPathController* controller; + + while (cursor.Next(controller)) { + if (controller->ActorExists(p_actor) == TRUE) { + return TRUE; + } + } + + return FALSE; +} + // FUNCTION: LEGO1 0x1001fda0 // FUNCTION: BETA10 0x100da621 void LegoWorld::FUN_1001fda0(LegoAnimPresenter* p_presenter)