2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 03:47:43 +00:00

Finish CPlayerVisor and CSamusFaceReflection

This commit is contained in:
Jack Andersen
2017-05-30 16:51:38 -10:00
parent 0c5e4efc46
commit 6f84cfcb38
13 changed files with 369 additions and 114 deletions

View File

@@ -214,7 +214,7 @@ void CStateManager::UpdateThermalVisor()
CPlayerState::EPlayerVisor visor = x8b8_playerState->GetActiveVisor(*this);
if (visor == CPlayerState::EPlayerVisor::Thermal && x8cc_nextAreaId != kInvalidAreaId)
{
std::unique_ptr<CGameArea>& area = x850_world->GetGameAreas()[x8cc_nextAreaId];
CGameArea* area = x850_world->GetArea(x8cc_nextAreaId);
const zeus::CTransform& playerXf = x84c_player->GetTransform();
zeus::CVector3f playerXYPos(playerXf.origin.x, playerXf.origin.y, 0.f);
CGameArea* lastArea = nullptr;
@@ -231,14 +231,14 @@ void CStateManager::UpdateThermalVisor()
TAreaId connAreaId = dock.GetConnectedAreaId(0);
if (connAreaId != kInvalidAreaId)
{
std::unique_ptr<CGameArea>& connArea = x850_world->GetGameAreas()[x8cc_nextAreaId];
CGameArea* connArea = x850_world->GetArea(x8cc_nextAreaId);
if (connArea->IsPostConstructed())
{
CGameArea::EOcclusionState occState = connArea->GetPostConstructed()->x10dc_occlusionState;
if (occState == CGameArea::EOcclusionState::Visible)
{
closestDist = dist;
lastArea = connArea.get();
lastArea = connArea;
}
}
}