From b978787f8f0333dd69a60ddd004d23b4d4fd7dc0 Mon Sep 17 00:00:00 2001
From: Christian Semmler <mail@csemmler.com>
Date: Wed, 29 May 2024 13:24:08 -0400
Subject: [PATCH] Implement/match LegoAnimationManager::FUN_10062e20 (#967)

---
 .../legoomni/include/legoanimationmanager.h   |   2 +-
 .../legoomni/include/legopathcontroller.h     |   6 +-
 LEGO1/lego/legoomni/include/legoworld.h       |   6 +-
 LEGO1/lego/legoomni/src/actors/helicopter.cpp |   4 +-
 .../legoomni/src/actors/islepathactor.cpp     |   6 +-
 .../src/common/legoanimationmanager.cpp       | 170 ++++++++++++++++--
 .../src/common/legoanimmmpresenter.cpp        |   6 +-
 .../legoomni/src/common/legogamestate.cpp     |   8 +-
 LEGO1/lego/legoomni/src/entity/legoworld.cpp  |  16 +-
 .../legoomni/src/paths/legopathcontroller.cpp |   6 +-
 LEGO1/lego/legoomni/src/worlds/isle.cpp       |  14 +-
 11 files changed, 197 insertions(+), 47 deletions(-)

diff --git a/LEGO1/lego/legoomni/include/legoanimationmanager.h b/LEGO1/lego/legoomni/include/legoanimationmanager.h
index 1ad249ea..e118cbf5 100644
--- a/LEGO1/lego/legoomni/include/legoanimationmanager.h
+++ b/LEGO1/lego/legoomni/include/legoanimationmanager.h
@@ -28,7 +28,7 @@ public:
 	// SIZE 0x18
 	struct Character {
 		char* m_name;        // 0x00
-		MxBool m_unk0x04;    // 0x04
+		MxBool m_inExtras;   // 0x04
 		MxS8 m_vehicleId;    // 0x05
 		undefined m_unk0x06; // 0x06 (unused?)
 		MxBool m_unk0x07;    // 0x07
diff --git a/LEGO1/lego/legoomni/include/legopathcontroller.h b/LEGO1/lego/legoomni/include/legopathcontroller.h
index a65a1f34..7bb38b61 100644
--- a/LEGO1/lego/legoomni/include/legopathcontroller.h
+++ b/LEGO1/lego/legoomni/include/legopathcontroller.h
@@ -81,7 +81,7 @@ public:
 	virtual MxResult Create(MxU8* p_data, const Vector3& p_location, const MxAtomId& p_trigger); // vtable+0x14
 	virtual void Destroy();                                                                      // vtable+0x18
 
-	MxResult FUN_10045c20(
+	MxResult PlaceActor(
 		LegoPathActor* p_actor,
 		const char* p_name,
 		MxS32 p_src,
@@ -89,13 +89,13 @@ public:
 		MxS32 p_dest,
 		float p_destScale
 	);
-	MxResult FUN_10046050(
+	MxResult PlaceActor(
 		LegoPathActor* p_actor,
 		LegoAnimPresenter* p_presenter,
 		Vector3& p_position,
 		Vector3& p_direction
 	);
-	MxResult AddActor(LegoPathActor* p_actor);
+	MxResult PlaceActor(LegoPathActor* p_actor);
 	MxResult RemoveActor(LegoPathActor* p_actor);
 	void FUN_100468f0(LegoAnimPresenter* p_presenter);
 	void FUN_10046930(LegoAnimPresenter* p_presenter);
diff --git a/LEGO1/lego/legoomni/include/legoworld.h b/LEGO1/lego/legoomni/include/legoworld.h
index 2dd7321a..79088500 100644
--- a/LEGO1/lego/legoomni/include/legoworld.h
+++ b/LEGO1/lego/legoomni/include/legoworld.h
@@ -72,14 +72,14 @@ public:
 		MxS32 p_dest,
 		float p_destScale
 	);
-	MxResult AddPathActor(LegoPathActor* p_actor);
-	MxResult FUN_1001fb70(
+	MxResult PlaceActor(LegoPathActor* p_actor);
+	MxResult PlaceActor(
 		LegoPathActor* p_actor,
 		LegoAnimPresenter* p_presenter,
 		Vector3& p_position,
 		Vector3& p_direction
 	);
-	void RemovePathActor(LegoPathActor* p_actor);
+	void RemoveActor(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 d3b3ef51..5c0a26b3 100644
--- a/LEGO1/lego/legoomni/src/actors/helicopter.cpp
+++ b/LEGO1/lego/legoomni/src/actors/helicopter.cpp
@@ -192,7 +192,7 @@ MxU32 Helicopter::VTable0xd4(LegoControlManagerEvent& p_param)
 			if (m_state->GetUnkown8() == 0) {
 				state->SetUnknown18(4);
 				m_state->SetUnknown8(1);
-				m_world->RemovePathActor(this);
+				m_world->RemoveActor(this);
 				InvokeAction(Extra::ActionType::e_start, script, IsleScript::c_HelicopterTakeOff_Anim, NULL);
 				SetState(0);
 			}
@@ -205,7 +205,7 @@ MxU32 Helicopter::VTable0xd4(LegoControlManagerEvent& p_param)
 			}
 			if (m_state->GetUnkown8() == 2) {
 				m_state->SetUnknown8(3);
-				m_world->RemovePathActor(this);
+				m_world->RemoveActor(this);
 				InvokeAction(Extra::ActionType::e_start, script, IsleScript::c_HelicopterLand_Anim, NULL);
 				SetState(4);
 			}
diff --git a/LEGO1/lego/legoomni/src/actors/islepathactor.cpp b/LEGO1/lego/legoomni/src/actors/islepathactor.cpp
index edaaa314..c3913942 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->RemovePathActor(this);
+			m_world->RemoveActor(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->RemovePathActor(this);
+		m_world->RemoveActor(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->AddPathActor(this);
+	m_world->PlaceActor(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 60545c39..39de0c7a 100644
--- a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp
+++ b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp
@@ -347,7 +347,7 @@ LegoAnimationManager::~LegoAnimationManager()
 			LegoPathActor* actor = CharacterManager()->GetActor(roi->GetName());
 
 			if (actor != NULL && actor->GetController() != NULL && CurrentWorld() != NULL) {
-				CurrentWorld()->RemovePathActor(actor);
+				CurrentWorld()->RemoveActor(actor);
 				actor->SetController(NULL);
 			}
 
@@ -467,7 +467,7 @@ void LegoAnimationManager::Suspend()
 		m_unk0x401 = FALSE;
 
 		for (i = 0; i < (MxS32) sizeOfArray(g_characters); i++) {
-			g_characters[i].m_unk0x04 = FALSE;
+			g_characters[i].m_inExtras = FALSE;
 		}
 	}
 }
@@ -531,7 +531,7 @@ void LegoAnimationManager::Init()
 
 	for (i = 0; i < (MxS32) sizeOfArray(g_characters); i++) {
 		g_characters[i].m_active = FALSE;
-		g_characters[i].m_unk0x04 = FALSE;
+		g_characters[i].m_inExtras = FALSE;
 	}
 
 	for (i = 0; i < (MxS32) sizeOfArray(g_vehicles); i++) {
@@ -1468,7 +1468,7 @@ MxResult LegoAnimationManager::Tickle()
 				}
 
 				m_extras[i].m_roi = NULL;
-				g_characters[m_extras[i].m_characterId].m_unk0x04 = FALSE;
+				g_characters[m_extras[i].m_characterId].m_inExtras = FALSE;
 				g_characters[m_extras[i].m_characterId].m_unk0x07 = FALSE;
 				m_extras[i].m_characterId = -1;
 				m_extras[i].m_unk0x0d = FALSE;
@@ -1837,7 +1837,7 @@ void LegoAnimationManager::PurgeExtra(MxBool p_und)
 					}
 
 					m_extras[i].m_roi = NULL;
-					g_characters[m_extras[i].m_characterId].m_unk0x04 = FALSE;
+					g_characters[m_extras[i].m_characterId].m_inExtras = FALSE;
 					g_characters[m_extras[i].m_characterId].m_unk0x07 = FALSE;
 					m_extras[i].m_characterId = -1;
 				}
@@ -1928,7 +1928,7 @@ void LegoAnimationManager::AddExtra(MxS32 p_location, MxBool p_und)
 							tryNextCharacter:
 								if (g_characters[m_lastExtraCharacterId].m_unk0x09 &&
 									g_characters[m_lastExtraCharacterId].m_unk0x08 &&
-									!g_characters[m_lastExtraCharacterId].m_unk0x04 &&
+									!g_characters[m_lastExtraCharacterId].m_inExtras &&
 									g_characters[m_lastExtraCharacterId].m_active == active) {
 									if (!CharacterManager()->FUN_10083b20(g_characters[m_lastExtraCharacterId].m_name
 										)) {
@@ -1994,7 +1994,7 @@ void LegoAnimationManager::AddExtra(MxS32 p_location, MxBool p_und)
 											actor->SetWorldSpeed(speed);
 
 											m_extras[i].m_characterId = m_lastExtraCharacterId;
-											g_characters[m_lastExtraCharacterId].m_unk0x04 = TRUE;
+											g_characters[m_lastExtraCharacterId].m_inExtras = TRUE;
 											m_extras[i].m_unk0x08 = Timer()->GetTime();
 											m_extras[i].m_speed = -1;
 											m_extras[i].m_unk0x0d = FALSE;
@@ -2029,10 +2029,160 @@ void LegoAnimationManager::AddExtra(MxS32 p_location, MxBool p_und)
 	}
 }
 
-// STUB: LEGO1 0x10062e20
+// FUNCTION: LEGO1 0x10062e20
 // FUNCTION: BETA10 0x100444cb
 MxBool LegoAnimationManager::FUN_10062e20(LegoROI* p_roi, LegoAnimPresenter* p_presenter)
 {
+	LegoWorld* world = CurrentWorld();
+
+	if (world == NULL || m_suspended || !m_unk0x400) {
+		return FALSE;
+	}
+
+	MxBool inExtras = FALSE;
+	const char* name = p_roi->GetName();
+
+	LegoExtraActor* actor = CharacterManager()->GetActor(name);
+	if (actor != NULL) {
+		MxS32 characterId = -1;
+		MxS32 i;
+
+		for (i = 0; i < (MxS32) sizeOfArray(g_characters); i++) {
+			if (!strcmpi(name, g_characters[i].m_name)) {
+				characterId = i;
+				break;
+			}
+		}
+
+		if (characterId == -1) {
+			return FALSE;
+		}
+
+		if (!g_characters[characterId].m_inExtras) {
+			for (i = 0; i < (MxS32) sizeOfArray(m_extras); i++) {
+				if (m_extras[i].m_roi == NULL) {
+					m_extras[i].m_roi = p_roi;
+					break;
+				}
+			}
+
+			if (i == (MxS32) sizeOfArray(m_extras)) {
+				return FALSE;
+			}
+		}
+		else {
+			inExtras = TRUE;
+
+			for (i = 0; i < (MxS32) sizeOfArray(m_extras); i++) {
+				if (m_extras[i].m_roi == p_roi) {
+					break;
+				}
+			}
+
+			if (i == (MxS32) sizeOfArray(m_extras)) {
+				return FALSE;
+			}
+		}
+
+		if (g_characters[characterId].m_unk0x07) {
+			m_unk0x414--;
+
+			if (actor->GetBoundary() == NULL) {
+				g_characters[characterId].m_unk0x07 = FALSE;
+
+				if (g_characters[characterId].m_unk0x0c < 0) {
+					g_characters[characterId].m_unk0x0c = 0;
+				}
+
+				if (g_characters[characterId].m_unk0x10 < 0) {
+					g_characters[characterId].m_unk0x10 = 0;
+				}
+
+				m_extras[i].m_roi = NULL;
+				g_characters[characterId].m_unk0x07 = FALSE;
+				g_characters[characterId].m_inExtras = FALSE;
+				return FALSE;
+			}
+
+			CharacterManager()->FUN_10083db0(p_roi);
+		}
+		else {
+			if (inExtras) {
+				return FALSE;
+			}
+		}
+
+		if (GameState()->GetCurrentAct() != LegoGameState::e_act1 && !strcmp(name, "brickstr")) {
+			return FALSE;
+		}
+
+		MxBool local24 = inExtras && g_characters[characterId].m_unk0x07 &&
+						 (g_characters[characterId].m_unk0x0c < 0 || g_characters[characterId].m_unk0x10 < 0);
+
+		MxResult result = 1; // Not a valid MxResult value
+
+		if (!local24) {
+			MxU8 unk0x0c;
+
+			switch (rand() % 3) {
+			case 0:
+				unk0x0c = 1;
+				break;
+			case 1:
+				unk0x0c = 2;
+				break;
+			case 2:
+				unk0x0c = 0;
+				break;
+			}
+
+			actor->SetUnknown0x0c(unk0x0c);
+
+			Mx3DPointFloat position;
+			Mx3DPointFloat direction;
+
+			position = p_roi->GetWorldPosition();
+			direction = p_roi->GetWorldDirection();
+
+			((Vector3&) direction).Mul(-1.0f);
+			m_extras[i].m_speed = -1.0f;
+
+			if (inExtras) {
+				actor->ClearMaps();
+			}
+
+			if (FUN_10063b90(world, actor, CharacterManager()->GetMood(p_roi), characterId)) {
+				m_extras[i].m_unk0x14 = TRUE;
+			}
+			else {
+				m_extras[i].m_unk0x14 = FALSE;
+			}
+
+			result = world->PlaceActor(actor, p_presenter, position, direction);
+		}
+
+		if (result != SUCCESS && g_characters[characterId].m_unk0x07) {
+			result = world->PlaceActor(actor);
+		}
+
+		g_characters[characterId].m_unk0x07 = FALSE;
+
+		if (result != SUCCESS) {
+			m_extras[i].m_roi = NULL;
+			g_characters[characterId].m_inExtras = FALSE;
+		}
+		else {
+			m_extras[i].m_characterId = characterId;
+			m_extras[i].m_unk0x08 = Timer()->GetTime();
+			m_extras[i].m_unk0x0c = TRUE;
+			m_extras[i].m_unk0x0d = FALSE;
+			g_characters[characterId].m_inExtras = TRUE;
+			actor->SetWorldSpeed(0.0f);
+			m_unk0x414++;
+			return TRUE;
+		}
+	}
+
 	return FALSE;
 }
 
@@ -2091,7 +2241,7 @@ void LegoAnimationManager::FUN_10063270(LegoROIList* p_list, LegoAnimPresenter*
 							}
 
 							m_extras[i].m_roi = NULL;
-							g_characters[m_extras[i].m_characterId].m_unk0x04 = FALSE;
+							g_characters[m_extras[i].m_characterId].m_inExtras = FALSE;
 							g_characters[m_extras[i].m_characterId].m_unk0x07 = FALSE;
 							m_extras[i].m_characterId = -1;
 							m_extras[i].m_unk0x0d = FALSE;
@@ -2510,7 +2660,7 @@ MxResult LegoAnimationManager::FUN_10064380(
 
 		g_characters[characterId].m_unk0x0c = p_unk0x0c;
 		g_characters[characterId].m_unk0x10 = p_unk0x10;
-		g_characters[characterId].m_unk0x04 = TRUE;
+		g_characters[characterId].m_inExtras = TRUE;
 		return SUCCESS;
 	}
 
diff --git a/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp b/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp
index 6b778ad7..b88392e5 100644
--- a/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp
+++ b/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp
@@ -433,7 +433,7 @@ MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time)
 			undefined4 und = 1;
 
 			if (m_presenter != NULL) {
-				m_unk0x64->RemovePathActor(actor);
+				m_unk0x64->RemoveActor(actor);
 
 				if (m_tranInfo->m_unk0x29) {
 					Mx3DPointFloat position, direction;
@@ -442,7 +442,7 @@ MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time)
 					direction = viewROI->GetWorldDirection();
 					position[1] -= 1.25;
 
-					und = m_unk0x64->FUN_1001fb70(actor, m_presenter, position, direction);
+					und = m_unk0x64->PlaceActor(actor, m_presenter, position, direction);
 				}
 				else {
 					und = 0;
@@ -452,7 +452,7 @@ MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time)
 			if (und != 0) {
 				viewROI->WrappedSetLocalTransform(m_tranInfo->m_unk0x2c);
 				VideoManager()->Get3DManager()->Moved(*viewROI);
-				m_unk0x64->AddPathActor(actor);
+				m_unk0x64->PlaceActor(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 79d6b1d4..64f4c494 100644
--- a/LEGO1/lego/legoomni/src/common/legogamestate.cpp
+++ b/LEGO1/lego/legoomni/src/common/legogamestate.cpp
@@ -1102,28 +1102,28 @@ void LegoGameState::Init()
 
 		Helicopter* copter = (Helicopter*) isle->Find(*g_copterScript, CopterScript::c_Helicopter_Actor);
 		if (copter) {
-			isle->RemovePathActor(copter);
+			isle->RemoveActor(copter);
 			isle->VTable0x6c(copter);
 			delete copter;
 		}
 
 		DuneBuggy* dunebuggy = (DuneBuggy*) isle->Find(*g_dunecarScript, DunecarScript::c_DuneBugy_Actor);
 		if (dunebuggy) {
-			isle->RemovePathActor(dunebuggy);
+			isle->RemoveActor(dunebuggy);
 			isle->VTable0x6c(dunebuggy);
 			delete dunebuggy;
 		}
 
 		Jetski* jetski = (Jetski*) isle->Find(*g_jetskiScript, JetskiScript::c_Jetski_Actor);
 		if (jetski) {
-			isle->RemovePathActor(jetski);
+			isle->RemoveActor(jetski);
 			isle->VTable0x6c(jetski);
 			delete jetski;
 		}
 
 		RaceCar* racecar = (RaceCar*) isle->Find(*g_racecarScript, RacecarScript::c_RaceCar_Actor);
 		if (racecar) {
-			isle->RemovePathActor(racecar);
+			isle->RemoveActor(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 b0cb72dd..5d4dcd00 100644
--- a/LEGO1/lego/legoomni/src/entity/legoworld.cpp
+++ b/LEGO1/lego/legoomni/src/entity/legoworld.cpp
@@ -286,7 +286,7 @@ MxResult LegoWorld::PlaceActor(
 	LegoPathController* controller;
 
 	while (cursor.Next(controller)) {
-		if (controller->FUN_10045c20(p_actor, p_name, p_src, p_srcScale, p_dest, p_destScale) == SUCCESS) {
+		if (controller->PlaceActor(p_actor, p_name, p_src, p_srcScale, p_dest, p_destScale) == SUCCESS) {
 			return SUCCESS;
 		}
 	}
@@ -295,13 +295,13 @@ MxResult LegoWorld::PlaceActor(
 }
 
 // FUNCTION: LEGO1 0x1001fa70
-MxResult LegoWorld::AddPathActor(LegoPathActor* p_actor)
+MxResult LegoWorld::PlaceActor(LegoPathActor* p_actor)
 {
 	LegoPathControllerListCursor cursor(&m_list0x68);
 	LegoPathController* controller;
 
 	while (cursor.Next(controller)) {
-		if (controller->AddActor(p_actor) == SUCCESS) {
+		if (controller->PlaceActor(p_actor) == SUCCESS) {
 			return SUCCESS;
 		}
 	}
@@ -310,7 +310,7 @@ MxResult LegoWorld::AddPathActor(LegoPathActor* p_actor)
 }
 
 // FUNCTION: LEGO1 0x1001fb70
-MxResult LegoWorld::FUN_1001fb70(
+MxResult LegoWorld::PlaceActor(
 	LegoPathActor* p_actor,
 	LegoAnimPresenter* p_presenter,
 	Vector3& p_position,
@@ -321,7 +321,7 @@ MxResult LegoWorld::FUN_1001fb70(
 	LegoPathController* controller;
 
 	while (cursor.Next(controller)) {
-		if (controller->FUN_10046050(p_actor, p_presenter, p_position, p_direction) == SUCCESS) {
+		if (controller->PlaceActor(p_actor, p_presenter, p_position, p_direction) == SUCCESS) {
 			return SUCCESS;
 		}
 	}
@@ -330,7 +330,7 @@ MxResult LegoWorld::FUN_1001fb70(
 }
 
 // FUNCTION: LEGO1 0x1001fc80
-void LegoWorld::RemovePathActor(LegoPathActor* p_actor)
+void LegoWorld::RemoveActor(LegoPathActor* p_actor)
 {
 	LegoPathControllerListCursor cursor(&m_list0x68);
 	LegoPathController* controller;
@@ -502,7 +502,7 @@ void LegoWorld::Remove(MxCore* p_object)
 		}
 		else if (p_object->IsA("MxEntity")) {
 			if (p_object->IsA("LegoPathActor")) {
-				RemovePathActor((LegoPathActor*) p_object);
+				RemoveActor((LegoPathActor*) p_object);
 			}
 
 			if (m_entityList) {
@@ -703,7 +703,7 @@ void LegoWorld::Enable(MxBool p_enable)
 		LegoPathActor* actor = CurrentActor();
 
 		if (actor) {
-			RemovePathActor(actor);
+			RemoveActor(actor);
 		}
 
 		AnimationManager()->Reset(FALSE);
diff --git a/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp b/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp
index eeed3661..3a5a763b 100644
--- a/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp
+++ b/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp
@@ -198,7 +198,7 @@ MxResult LegoPathController::Tickle()
 
 // FUNCTION: LEGO1 0x10045c20
 // FUNCTION: BETA10 0x100b6d80
-MxResult LegoPathController::FUN_10045c20(
+MxResult LegoPathController::PlaceActor(
 	LegoPathActor* p_actor,
 	const char* p_name,
 	MxS32 p_src,
@@ -229,7 +229,7 @@ MxResult LegoPathController::FUN_10045c20(
 
 // FUNCTION: LEGO1 0x10046050
 // FUNCTION: BETA10 0x100b6f35
-MxResult LegoPathController::FUN_10046050(
+MxResult LegoPathController::PlaceActor(
 	LegoPathActor* p_actor,
 	LegoAnimPresenter* p_presenter,
 	Vector3& p_position,
@@ -303,7 +303,7 @@ MxResult LegoPathController::FUN_10046050(
 
 // FUNCTION: LEGO1 0x100466a0
 // FUNCTION: BETA10 0x100b71fe
-MxResult LegoPathController::AddActor(LegoPathActor* p_actor)
+MxResult LegoPathController::PlaceActor(LegoPathActor* p_actor)
 {
 	if (p_actor->GetController() != NULL) {
 		p_actor->GetController()->RemoveActor(p_actor);
diff --git a/LEGO1/lego/legoomni/src/worlds/isle.cpp b/LEGO1/lego/legoomni/src/worlds/isle.cpp
index 9e692616..8c061f99 100644
--- a/LEGO1/lego/legoomni/src/worlds/isle.cpp
+++ b/LEGO1/lego/legoomni/src/worlds/isle.cpp
@@ -590,7 +590,7 @@ void Isle::Enable(MxBool p_enable)
 				m_act1state->m_unk0x018 = 5;
 			}
 
-			AddPathActor(CurrentActor());
+			PlaceActor(CurrentActor());
 			SetIsWorldActive(TRUE);
 
 #ifdef COMPAT_MODE
@@ -613,7 +613,7 @@ void Isle::Enable(MxBool p_enable)
 			SetIsWorldActive(FALSE);
 			break;
 		case LegoGameState::e_bike:
-			AddPathActor(CurrentActor());
+			PlaceActor(CurrentActor());
 			SetIsWorldActive(TRUE);
 
 #ifdef COMPAT_MODE
@@ -626,7 +626,7 @@ void Isle::Enable(MxBool p_enable)
 #endif
 			break;
 		case LegoGameState::e_dunecar:
-			AddPathActor(CurrentActor());
+			PlaceActor(CurrentActor());
 			SetIsWorldActive(TRUE);
 
 #ifdef COMPAT_MODE
@@ -639,7 +639,7 @@ void Isle::Enable(MxBool p_enable)
 #endif
 			break;
 		case LegoGameState::e_motocycle:
-			AddPathActor(CurrentActor());
+			PlaceActor(CurrentActor());
 			SetIsWorldActive(TRUE);
 
 #ifdef COMPAT_MODE
@@ -652,7 +652,7 @@ void Isle::Enable(MxBool p_enable)
 #endif
 			break;
 		case LegoGameState::e_copter:
-			AddPathActor(CurrentActor());
+			PlaceActor(CurrentActor());
 			SetIsWorldActive(TRUE);
 
 #ifdef COMPAT_MODE
@@ -665,7 +665,7 @@ void Isle::Enable(MxBool p_enable)
 #endif
 			break;
 		case LegoGameState::e_skateboard:
-			AddPathActor(CurrentActor());
+			PlaceActor(CurrentActor());
 			SetIsWorldActive(TRUE);
 
 #ifdef COMPAT_MODE
@@ -678,7 +678,7 @@ void Isle::Enable(MxBool p_enable)
 #endif
 			break;
 		case LegoGameState::e_jetski:
-			AddPathActor(CurrentActor());
+			PlaceActor(CurrentActor());
 			SetIsWorldActive(TRUE);
 
 #ifdef COMPAT_MODE