2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 22:27:43 +00:00

Fix crash while taking damage in morphball

This commit is contained in:
2018-12-16 13:10:18 -08:00
parent f184291461
commit 62d68a98da
2 changed files with 7 additions and 25 deletions

View File

@@ -917,13 +917,14 @@ void CSamusHud::UpdateHudDamage(float dt, const CStateManager& mgr, DataSpec::IT
x28c_energyIntf->SetFlashMagnitude(practicals);
practicals = std::min(practicals * x404_hudDamagePracticalsGain, 1.f);
x2a0_helmetIntf->AddHelmetLightValue(practicals);
if (x29c_decoIntf)
if (x29c_decoIntf) {
x29c_decoIntf->SetFrameColorValue(practicals);
if (practicals > 0.f) {
x3d4_damageLight->SetColor(g_tweakGuiColors->GetHudDamageLightColor() * zeus::CColor(practicals));
x3d4_damageLight->SetIsVisible(true);
} else {
x3d4_damageLight->SetIsVisible(false);
if (practicals > 0.f) {
x3d4_damageLight->SetColor(g_tweakGuiColors->GetHudDamageLightColor() * zeus::CColor(practicals));
x3d4_damageLight->SetIsVisible(true);
} else {
x3d4_damageLight->SetIsVisible(false);
}
}
}