diff --git a/LEGO1/lego/legoomni/include/legonavcontroller.h b/LEGO1/lego/legoomni/include/legonavcontroller.h index 77131fbf..4003e6fd 100644 --- a/LEGO1/lego/legoomni/include/legonavcontroller.h +++ b/LEGO1/lego/legoomni/include/legonavcontroller.h @@ -70,7 +70,7 @@ class LegoNavController : public MxCore { float p_rs, MxBool p_urs ); - static MxResult SetLocation(MxU32 p_location); + static MxResult UpdateCameraLocation(MxU32 p_location); static MxResult UpdateCameraLocation(const char* p_location); // SYNTHETIC: LEGO1 0x10054c10 diff --git a/LEGO1/lego/legoomni/src/common/legogamestate.cpp b/LEGO1/lego/legoomni/src/common/legogamestate.cpp index 29cc9b07..8c61bae7 100644 --- a/LEGO1/lego/legoomni/src/common/legogamestate.cpp +++ b/LEGO1/lego/legoomni/src/common/legogamestate.cpp @@ -889,7 +889,7 @@ void LegoGameState::SwitchArea(Area p_area) LoadIsle(); VariableTable()->SetVariable("VISIBILITY", "Hide Gas"); CurrentActor()->ResetWorldTransform(FALSE); - NavController()->SetLocation(0x3b); + NavController()->UpdateCameraLocation(59); // LCAMZG1 in g_cameraLocations VideoManager()->Get3DManager()->SetFrustrum(90, 0.1f, 250.0f); InvokeAction(Extra::ActionType::e_start, *g_isleScript, IsleScript::c_GaraDoor, NULL); break; diff --git a/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp b/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp index 93da9c8f..27f9bece 100644 --- a/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp +++ b/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp @@ -436,9 +436,10 @@ MxResult LegoNavController::UpdateCameraLocation(const char* p_location) } // FUNCTION: LEGO1 0x10055620 -MxResult LegoNavController::SetLocation(MxU32 p_location) +MxResult LegoNavController::UpdateCameraLocation(MxU32 p_location) { MxResult result = FAILURE; + if (p_location < _countof(g_cameraLocations)) { MxMatrix mat; LegoROI* viewROI = VideoManager()->GetViewROI(); @@ -463,8 +464,10 @@ MxResult LegoNavController::SetLocation(MxU32 p_location) viewROI->GetWorldUp(), viewROI->GetWorldVelocity() ); + result = SUCCESS; } + return result; } @@ -487,6 +490,7 @@ MxLong LegoNavController::Notify(MxParam& p_param) { if (((MxNotificationParam&) p_param).GetType() == c_notificationKeyPress) { m_unk0x5d = TRUE; + switch (((LegoEventNotificationParam&) p_param).GetKey()) { case VK_PAUSE: if (Lego()->IsTimerRunning()) { @@ -496,7 +500,6 @@ MxLong LegoNavController::Notify(MxParam& p_param) Lego()->StartTimer(); } break; - case VK_ESCAPE: { LegoWorld* currentWorld = CurrentWorld(); if (currentWorld) {