Fix crash while taking damage in morphball

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

View File

@ -12,25 +12,6 @@
<option name="SPACE_AFTER_REFERENCE_IN_DECLARATION" value="true" />
</Objective-C>
<Objective-C-extensions>
<file>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
</file>
<class>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
</class>
<extensions>
<pair source="cpp" header="hpp" fileNamingConvention="NONE" />
<pair source="c" header="h" fileNamingConvention="NONE" />

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);
}
}
}