From 5f34d2e877a5c0544d866ab5f853cc9f6bc9729d Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Mon, 13 May 2024 06:46:59 -0400 Subject: [PATCH] Implement/match LegoPathController::AddActor and RemoveActor (#915) * Implement/match LegoPathController::AddActor and RemoveActor * Fix types --- .../lego/legoomni/include/legopathboundary.h | 5 +- .../legoomni/include/legopathcontroller.h | 15 ++++- LEGO1/lego/legoomni/include/legoworld.h | 8 +-- LEGO1/lego/legoomni/src/actors/helicopter.cpp | 4 +- .../legoomni/src/actors/islepathactor.cpp | 6 +- .../src/common/legoanimationmanager.cpp | 12 ++-- .../src/common/legoanimmmpresenter.cpp | 4 +- .../legoomni/src/common/legogamestate.cpp | 8 +-- LEGO1/lego/legoomni/src/entity/legoworld.cpp | 64 ++++++++++++------- .../legoomni/src/paths/legoextraactor.cpp | 8 +-- .../lego/legoomni/src/paths/legopathactor.cpp | 10 +-- .../legoomni/src/paths/legopathboundary.cpp | 8 +++ .../legoomni/src/paths/legopathcontroller.cpp | 48 ++++++++++++-- LEGO1/lego/legoomni/src/worlds/isle.cpp | 14 ++-- 14 files changed, 145 insertions(+), 69 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legopathboundary.h b/LEGO1/lego/legoomni/include/legopathboundary.h index 9adf1474..7ce0e200 100644 --- a/LEGO1/lego/legoomni/include/legopathboundary.h +++ b/LEGO1/lego/legoomni/include/legopathboundary.h @@ -29,13 +29,14 @@ class LegoPathBoundary : public LegoWEGEdge { ~LegoPathBoundary() override; MxResult AddActor(LegoPathActor* p_actor); + MxResult RemoveActor(LegoPathActor* p_actor); void FUN_100575b0(Vector3& p_point1, Vector3& p_point2, LegoPathActor* p_actor); MxU32 Intersect(float p_scale, Vector3& p_point1, Vector3& p_point2, Vector3& p_point3, LegoEdge*& p_edge); MxU32 FUN_10057fe0(LegoAnimPresenter* p_presenter); MxU32 FUN_100586e0(LegoAnimPresenter* p_presenter); - inline LegoPathActorSet* GetActors() { return &m_actors; } - inline LegoAnimPresenterSet* GetPresenters() { return &m_presenters; } + inline LegoPathActorSet& GetActors() { return m_actors; } + inline LegoAnimPresenterSet& GetPresenters() { return m_presenters; } // SYNTHETIC: LEGO1 0x10047a80 // LegoPathBoundary::`vector deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legopathcontroller.h b/LEGO1/lego/legoomni/include/legopathcontroller.h index 43c4a419..23e6c740 100644 --- a/LEGO1/lego/legoomni/include/legopathcontroller.h +++ b/LEGO1/lego/legoomni/include/legopathcontroller.h @@ -89,7 +89,14 @@ class LegoPathController : public MxCore { MxS32 p_dest, float p_destScale ); - undefined4 FUN_10046770(LegoPathActor* p_actor); + MxResult FUN_10046050( + LegoPathActor* p_actor, + LegoAnimPresenter* p_presenter, + Vector3& p_position, + Vector3& p_direction + ); + MxResult AddActor(LegoPathActor* p_actor); + MxResult RemoveActor(LegoPathActor* p_actor); void FUN_100468f0(LegoAnimPresenter* p_presenter); void FUN_10046930(LegoAnimPresenter* p_presenter); MxResult FUN_10046b30(LegoPathBoundary*& p_boundaries, MxS32& p_numL); @@ -120,6 +127,9 @@ class LegoPathController : public MxCore { }; // clang-format off +// TEMPLATE: LEGO1 0x1001fd70 +// _Tree >::_Kfn,LegoPathActorSetCompare,allocator >::_Lbound + // TEMPLATE: LEGO1 0x1002c4a0 // _Tree >::_Kfn,LegoPathActorSetCompare,allocator >::_Buynode @@ -132,6 +142,9 @@ class LegoPathController : public MxCore { // TEMPLATE: LEGO1 0x10045830 // set >::~set > +// TEMPLATE: LEGO1 0x100468c0 +// _Tree >::_Kfn,LegoPathActorSetCompare,allocator >::_Ubound + // TEMPLATE: LEGO1 0x10047550 // _Tree >::_Kfn,LegoPathCtrlEdgeCompare,allocator >::_Insert diff --git a/LEGO1/lego/legoomni/include/legoworld.h b/LEGO1/lego/legoomni/include/legoworld.h index c0121f2b..cde4f4b1 100644 --- a/LEGO1/lego/legoomni/include/legoworld.h +++ b/LEGO1/lego/legoomni/include/legoworld.h @@ -73,14 +73,14 @@ class LegoWorld : public LegoEntity { MxS32 p_dest, float p_destScale ); - undefined4 FUN_1001fa70(IslePathActor* p_actor); - undefined4 FUN_1001fb70( - IslePathActor* p_actor, + MxResult AddPathActor(LegoPathActor* p_actor); + MxResult FUN_1001fb70( + LegoPathActor* p_actor, LegoAnimPresenter* p_presenter, Vector3& p_position, Vector3& p_direction ); - void FUN_1001fc80(IslePathActor* p_actor); + void RemovePathActor(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/actors/helicopter.cpp b/LEGO1/lego/legoomni/src/actors/helicopter.cpp index 0dd71005..ee3b6177 100644 --- a/LEGO1/lego/legoomni/src/actors/helicopter.cpp +++ b/LEGO1/lego/legoomni/src/actors/helicopter.cpp @@ -190,7 +190,7 @@ MxU32 Helicopter::VTable0xd4(LegoControlManagerEvent& p_param) if (m_state->GetUnkown8() == 0) { state->SetUnknown18(4); m_state->SetUnknown8(1); - m_world->FUN_1001fc80(this); + m_world->RemovePathActor(this); InvokeAction(Extra::ActionType::e_start, script, 0x20, NULL); SetState(0); } @@ -203,7 +203,7 @@ MxU32 Helicopter::VTable0xd4(LegoControlManagerEvent& p_param) } if (m_state->GetUnkown8() == 2) { m_state->SetUnknown8(3); - m_world->FUN_1001fc80(this); + m_world->RemovePathActor(this); InvokeAction(Extra::ActionType::e_start, script, 0x21, NULL); SetState(4); } diff --git a/LEGO1/lego/legoomni/src/actors/islepathactor.cpp b/LEGO1/lego/legoomni/src/actors/islepathactor.cpp index 61b203e9..02411891 100644 --- a/LEGO1/lego/legoomni/src/actors/islepathactor.cpp +++ b/LEGO1/lego/legoomni/src/actors/islepathactor.cpp @@ -471,7 +471,7 @@ void IslePathActor::SpawnPlayer(LegoGameState::Area p_area, MxBool p_und, MxU8 p assert(world); if (m_world != NULL) { - m_world->FUN_1001fc80(this); + m_world->RemovePathActor(this); m_world->Remove(this); VideoManager()->Get3DManager()->Remove(*m_roi); } @@ -556,7 +556,7 @@ void IslePathActor::SpawnPlayer(LegoGameState::Area p_area, MxBool p_und, MxU8 p void IslePathActor::VTable0xec(MxMatrix p_transform, LegoPathBoundary* p_boundary, MxBool p_reset) { if (m_world) { - m_world->FUN_1001fc80(this); + m_world->RemovePathActor(this); m_world->Remove(this); VideoManager()->Get3DManager()->GetLego3DView()->Remove(*m_roi); } @@ -566,7 +566,7 @@ void IslePathActor::VTable0xec(MxMatrix p_transform, LegoPathBoundary* p_boundar VTable0xe0(); } - m_world->FUN_1001fa70(this); + m_world->AddPathActor(this); p_boundary->AddActor(this); if (m_actorId != GameState()->GetActorId()) { m_world->Add(this); diff --git a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp index 3f4947a2..912e9d3d 100644 --- a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp +++ b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp @@ -151,7 +151,7 @@ LegoAnimationManager::~LegoAnimationManager() LegoPathActor* actor = CharacterManager()->GetActor(roi->GetName()); if (actor != NULL && actor->GetController() != NULL && CurrentWorld() != NULL) { - CurrentWorld()->FUN_1001fc80((IslePathActor*) actor); + CurrentWorld()->RemovePathActor(actor); actor->SetController(NULL); } @@ -237,7 +237,7 @@ void LegoAnimationManager::Suspend() LegoPathActor* actor = CharacterManager()->GetActor(roi->GetName()); if (actor != NULL && actor->GetController() != NULL) { - actor->GetController()->FUN_10046770(actor); + actor->GetController()->RemoveActor(actor); actor->SetController(NULL); } @@ -862,7 +862,7 @@ MxResult LegoAnimationManager::StartEntityAction(MxDSAction& p_dsAction, LegoEnt LegoPathController* controller = actor->GetController(); if (controller) { - controller->FUN_10046770(actor); + controller->RemoveActor(actor); actor->SetController(NULL); for (MxS32 i = 0; i < (MxS32) _countof(m_extras); i++) { @@ -1191,7 +1191,7 @@ MxResult LegoAnimationManager::Tickle() LegoPathActor* actor = CharacterManager()->GetActor(roi->GetName()); if (actor != NULL && actor->GetController() != NULL) { - actor->GetController()->FUN_10046770(actor); + actor->GetController()->RemoveActor(actor); actor->SetController(NULL); } @@ -1451,7 +1451,7 @@ void LegoAnimationManager::FUN_10062580(AnimInfo& p_info) LegoPathController* controller = actor->GetController(); if (controller) { - controller->FUN_10046770(actor); + controller->RemoveActor(actor); actor->SetController(NULL); for (MxS32 i = 0; i < (MxS32) _countof(m_extras); i++) { @@ -1560,7 +1560,7 @@ void LegoAnimationManager::PurgeExtra(MxBool p_und) LegoPathActor* actor = CharacterManager()->GetActor(roi->GetName()); if (actor != NULL && actor->GetController() != NULL) { - actor->GetController()->FUN_10046770(actor); + actor->GetController()->RemoveActor(actor); actor->SetController(NULL); } diff --git a/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp b/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp index 206c145f..0a3e882b 100644 --- a/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp +++ b/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp @@ -432,7 +432,7 @@ MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time) undefined4 und = 1; if (m_presenter != NULL) { - m_unk0x64->FUN_1001fc80(actor); + m_unk0x64->RemovePathActor(actor); if (m_tranInfo->m_unk0x29) { Mx3DPointFloat position, direction; @@ -451,7 +451,7 @@ MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time) if (und != 0) { viewROI->WrappedSetLocalTransform(m_tranInfo->m_unk0x2c); VideoManager()->Get3DManager()->Moved(*viewROI); - m_unk0x64->FUN_1001fa70(actor); + m_unk0x64->AddPathActor(actor); } if (m_tranInfo->m_unk0x29) { diff --git a/LEGO1/lego/legoomni/src/common/legogamestate.cpp b/LEGO1/lego/legoomni/src/common/legogamestate.cpp index a8cc6d9c..c07a1871 100644 --- a/LEGO1/lego/legoomni/src/common/legogamestate.cpp +++ b/LEGO1/lego/legoomni/src/common/legogamestate.cpp @@ -1100,28 +1100,28 @@ void LegoGameState::Init() Helicopter* copter = (Helicopter*) isle->Find(*g_copterScript, CopterScript::c_Helicopter_Actor); if (copter) { - isle->FUN_1001fc80(copter); + isle->RemovePathActor(copter); isle->VTable0x6c(copter); delete copter; } DuneBuggy* dunebuggy = (DuneBuggy*) isle->Find(*g_dunecarScript, DunecarScript::c_DuneBugy_Actor); if (dunebuggy) { - isle->FUN_1001fc80(dunebuggy); + isle->RemovePathActor(dunebuggy); isle->VTable0x6c(dunebuggy); delete dunebuggy; } Jetski* jetski = (Jetski*) isle->Find(*g_jetskiScript, JetskiScript::c_Jetski_Actor); if (jetski) { - isle->FUN_1001fc80(jetski); + isle->RemovePathActor(jetski); isle->VTable0x6c(jetski); delete jetski; } RaceCar* racecar = (RaceCar*) isle->Find(*g_racecarScript, RacecarScript::c_RaceCar_Actor); if (racecar) { - isle->FUN_1001fc80(racecar); + isle->RemovePathActor(racecar); isle->VTable0x6c(racecar); delete racecar; } diff --git a/LEGO1/lego/legoomni/src/entity/legoworld.cpp b/LEGO1/lego/legoomni/src/entity/legoworld.cpp index e4974ba7..0455f1a7 100644 --- a/LEGO1/lego/legoomni/src/entity/legoworld.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoworld.cpp @@ -295,33 +295,49 @@ MxResult LegoWorld::PlaceActor( return FAILURE; } -// STUB: LEGO1 0x1001fa70 -undefined4 LegoWorld::FUN_1001fa70(IslePathActor* p_actor) -{ - // TODO - return 0; -} - -// STUB: LEGO1 0x1001fb70 -undefined4 LegoWorld::FUN_1001fb70( - IslePathActor* p_actor, - LegoAnimPresenter* p_presenter, - Vector3& p_position, - Vector3& p_direction -) -{ - // TODO - return 0; -} - -// FUNCTION: LEGO1 0x1001fc80 -void LegoWorld::FUN_1001fc80(IslePathActor* p_actor) +// FUNCTION: LEGO1 0x1001fa70 +MxResult LegoWorld::AddPathActor(LegoPathActor* p_actor) { LegoPathControllerListCursor cursor(&m_list0x68); LegoPathController* controller; while (cursor.Next(controller)) { - if (!controller->FUN_10046770(p_actor)) { + if (controller->AddActor(p_actor) == SUCCESS) { + return SUCCESS; + } + } + + return FAILURE; +} + +// FUNCTION: LEGO1 0x1001fb70 +MxResult LegoWorld::FUN_1001fb70( + LegoPathActor* p_actor, + LegoAnimPresenter* p_presenter, + Vector3& p_position, + Vector3& p_direction +) +{ + LegoPathControllerListCursor cursor(&m_list0x68); + LegoPathController* controller; + + while (cursor.Next(controller)) { + if (controller->FUN_10046050(p_actor, p_presenter, p_position, p_direction) == SUCCESS) { + return SUCCESS; + } + } + + return FAILURE; +} + +// FUNCTION: LEGO1 0x1001fc80 +void LegoWorld::RemovePathActor(LegoPathActor* p_actor) +{ + LegoPathControllerListCursor cursor(&m_list0x68); + LegoPathController* controller; + + while (cursor.Next(controller)) { + if (controller->RemoveActor(p_actor) == SUCCESS) { break; } } @@ -487,7 +503,7 @@ void LegoWorld::Remove(MxCore* p_object) } else if (p_object->IsA("MxEntity")) { if (p_object->IsA("LegoPathActor")) { - FUN_1001fc80((IslePathActor*) p_object); + RemovePathActor((LegoPathActor*) p_object); } if (m_entityList) { @@ -688,7 +704,7 @@ void LegoWorld::Enable(MxBool p_enable) IslePathActor* actor = CurrentActor(); if (actor) { - FUN_1001fc80(actor); + RemovePathActor(actor); } AnimationManager()->Reset(FALSE); diff --git a/LEGO1/lego/legoomni/src/paths/legoextraactor.cpp b/LEGO1/lego/legoomni/src/paths/legoextraactor.cpp index 1f68645e..a88ca7b3 100644 --- a/LEGO1/lego/legoomni/src/paths/legoextraactor.cpp +++ b/LEGO1/lego/legoomni/src/paths/legoextraactor.cpp @@ -287,9 +287,9 @@ MxResult LegoExtraActor::WaitForAnimation() if (m_boundary != oldBoundary) { MxU32 b = FALSE; - LegoAnimPresenterSet* set = m_boundary->GetPresenters(); + LegoAnimPresenterSet& set = m_boundary->GetPresenters(); - for (LegoAnimPresenterSet::iterator it = set->begin(); it != set->end(); it++) { + for (LegoAnimPresenterSet::iterator it = set.begin(); it != set.end(); it++) { MxU32 roiMapSize; if ((*it)->GetROIMap(roiMapSize)) { b = TRUE; @@ -312,9 +312,9 @@ void LegoExtraActor::Restart() { if (m_unk0x0e != 0) { MxU32 b = FALSE; - LegoAnimPresenterSet* set = m_boundary->GetPresenters(); + LegoAnimPresenterSet& set = m_boundary->GetPresenters(); - for (LegoAnimPresenterSet::iterator it = set->begin(); it != set->end(); it++) { + for (LegoAnimPresenterSet::iterator it = set.begin(); it != set.end(); it++) { MxU32 roiMapSize; if ((*it)->GetROIMap(roiMapSize)) { b = TRUE; diff --git a/LEGO1/lego/legoomni/src/paths/legopathactor.cpp b/LEGO1/lego/legoomni/src/paths/legopathactor.cpp index 6d393746..a893ba53 100644 --- a/LEGO1/lego/legoomni/src/paths/legopathactor.cpp +++ b/LEGO1/lego/legoomni/src/paths/legopathactor.cpp @@ -431,19 +431,19 @@ MxU32 LegoPathActor::VTable0x6c( Vector3& p_v3 ) { - LegoAnimPresenterSet* laps = p_boundary->GetPresenters(); + LegoAnimPresenterSet& laps = p_boundary->GetPresenters(); - for (LegoAnimPresenterSet::iterator itap = laps->begin(); itap != laps->end(); itap++) { + for (LegoAnimPresenterSet::iterator itap = laps.begin(); itap != laps.end(); itap++) { if ((*itap)->VTable0x94(p_v1, p_v2, p_f1, p_f2, p_v3)) { return 1; } } - LegoPathActorSet* plpas = p_boundary->GetActors(); - LegoPathActorSet lpas(*plpas); + LegoPathActorSet& plpas = p_boundary->GetActors(); + LegoPathActorSet lpas(plpas); for (LegoPathActorSet::iterator itpa = lpas.begin(); itpa != lpas.end(); itpa++) { - if (plpas->find(*itpa) != plpas->end()) { + if (plpas.find(*itpa) != plpas.end()) { LegoPathActor* actor = *itpa; if (this != actor && !(actor->GetState() & 0x100)) { diff --git a/LEGO1/lego/legoomni/src/paths/legopathboundary.cpp b/LEGO1/lego/legoomni/src/paths/legopathboundary.cpp index f8242c19..25df258f 100644 --- a/LEGO1/lego/legoomni/src/paths/legopathboundary.cpp +++ b/LEGO1/lego/legoomni/src/paths/legopathboundary.cpp @@ -25,6 +25,14 @@ MxResult LegoPathBoundary::AddActor(LegoPathActor* p_actor) return SUCCESS; } +// FUNCTION: LEGO1 0x100574a0 +// FUNCTION: BETA10 0x100b156f +MxResult LegoPathBoundary::RemoveActor(LegoPathActor* p_actor) +{ + m_actors.erase(p_actor); + return SUCCESS; +} + // STUB: LEGO1 0x100575b0 void LegoPathBoundary::FUN_100575b0(Vector3& p_point1, Vector3& p_point2, LegoPathActor* p_actor) { diff --git a/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp b/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp index decfa9f6..5e5d5451 100644 --- a/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp +++ b/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp @@ -207,7 +207,7 @@ MxResult LegoPathController::FUN_10045c20( ) { if (p_actor->GetController() != NULL) { - p_actor->GetController()->FUN_10046770(p_actor); + p_actor->GetController()->RemoveActor(p_actor); p_actor->SetController(NULL); } @@ -226,11 +226,49 @@ MxResult LegoPathController::FUN_10045c20( return SUCCESS; } -// STUB: LEGO1 0x10046770 -// FUNCTION: BETA10 0x100b7264 -undefined4 LegoPathController::FUN_10046770(LegoPathActor* p_actor) +// STUB: LEGO1 0x10046050 +// FUNCTION: BETA10 0x100b6f35 +MxResult LegoPathController::FUN_10046050( + LegoPathActor* p_actor, + LegoAnimPresenter* p_presenter, + Vector3& p_position, + Vector3& p_direction +) { - return 0; + // TODO + return SUCCESS; +} + +// FUNCTION: LEGO1 0x100466a0 +// FUNCTION: BETA10 0x100b71fe +MxResult LegoPathController::AddActor(LegoPathActor* p_actor) +{ + if (p_actor->GetController() != NULL) { + p_actor->GetController()->RemoveActor(p_actor); + p_actor->SetController(NULL); + } + + m_actors.insert(p_actor); + p_actor->SetController(this); + return SUCCESS; +} + +// FUNCTION: LEGO1 0x10046770 +// FUNCTION: BETA10 0x100b7264 +MxResult LegoPathController::RemoveActor(LegoPathActor* p_actor) +{ + MxResult result = FAILURE; + + p_actor->VTable0xc4(); + m_actors.erase(p_actor); + + for (MxS32 i = 0; i < m_numL; i++) { + if (m_boundaries[i].RemoveActor(p_actor) == SUCCESS) { + result = SUCCESS; + } + } + + return result; } // FUNCTION: LEGO1 0x100468f0 diff --git a/LEGO1/lego/legoomni/src/worlds/isle.cpp b/LEGO1/lego/legoomni/src/worlds/isle.cpp index 89a7a8ee..df5b09f3 100644 --- a/LEGO1/lego/legoomni/src/worlds/isle.cpp +++ b/LEGO1/lego/legoomni/src/worlds/isle.cpp @@ -526,7 +526,7 @@ void Isle::Enable(MxBool p_enable) m_act1state->m_unk0x018 = 5; } - FUN_1001fa70(CurrentActor()); + AddPathActor(CurrentActor()); SetIsWorldActive(TRUE); #ifdef COMPAT_MODE @@ -549,7 +549,7 @@ void Isle::Enable(MxBool p_enable) SetIsWorldActive(FALSE); break; case LegoGameState::e_bike: - FUN_1001fa70(CurrentActor()); + AddPathActor(CurrentActor()); SetIsWorldActive(TRUE); #ifdef COMPAT_MODE @@ -562,7 +562,7 @@ void Isle::Enable(MxBool p_enable) #endif break; case LegoGameState::e_dunecar: - FUN_1001fa70(CurrentActor()); + AddPathActor(CurrentActor()); SetIsWorldActive(TRUE); #ifdef COMPAT_MODE @@ -575,7 +575,7 @@ void Isle::Enable(MxBool p_enable) #endif break; case LegoGameState::e_motocycle: - FUN_1001fa70(CurrentActor()); + AddPathActor(CurrentActor()); SetIsWorldActive(TRUE); #ifdef COMPAT_MODE @@ -588,7 +588,7 @@ void Isle::Enable(MxBool p_enable) #endif break; case LegoGameState::e_copter: - FUN_1001fa70(CurrentActor()); + AddPathActor(CurrentActor()); SetIsWorldActive(TRUE); #ifdef COMPAT_MODE @@ -601,7 +601,7 @@ void Isle::Enable(MxBool p_enable) #endif break; case LegoGameState::e_skateboard: - FUN_1001fa70(CurrentActor()); + AddPathActor(CurrentActor()); SetIsWorldActive(TRUE); #ifdef COMPAT_MODE @@ -614,7 +614,7 @@ void Isle::Enable(MxBool p_enable) #endif break; case LegoGameState::e_jetski: - FUN_1001fa70(CurrentActor()); + AddPathActor(CurrentActor()); SetIsWorldActive(TRUE); #ifdef COMPAT_MODE