Decomp Fixes: CVisorFlare::Render

This commit is contained in:
Henrique Gemignani Passos Lima 2022-10-23 16:51:15 +03:00
parent c55289143f
commit 997cf5e0df
No known key found for this signature in database
GPG Key ID: E224F951761145F8
1 changed files with 11 additions and 10 deletions

View File

@ -83,19 +83,20 @@ void CVisorFlare::Render(const zeus::CVector3f& pos, const CStateManager& mgr) c
}
SCOPED_GRAPHICS_DEBUG_GROUP("CVisorFlare::Render", zeus::skGrey);
u32 type;
const auto visor = mgr.GetPlayerState()->GetActiveVisor(mgr);
if (visor == CPlayerState::EPlayerVisor::Thermal) {
type = x2c_w1;
} else if (visor == CPlayerState::EPlayerVisor::XRay) {
return;
} else {
type = x30_w2;
}
if (type != 0) {
switch (mgr.GetPlayerState()->GetActiveVisor(mgr)) {
case CPlayerState::EPlayerVisor::Combat:
if (x30_w2 != 0)
return;
break;
case CPlayerState::EPlayerVisor::Thermal:
if (x2c_w1 != 0)
return;
break;
default:
return;
}
CGraphics::DisableAllLights();
g_Renderer->SetDepthReadWrite(false, false);
const CGameCamera* cam = mgr.GetCameraManager()->GetCurrentCamera(mgr);