mirror of https://github.com/AxioDL/metaforce.git
CHudFreeLookInterface: Collapse conditional within SetFreeLookState()
Same behavior, less code.
This commit is contained in:
parent
59fbefbd58
commit
ad07b993c8
|
@ -84,13 +84,9 @@ void CHudFreeLookInterface::SetFreeLookState(bool inFreeLook, bool lookControlHe
|
|||
x8c_basewidget_outlinesb->SetColor(color);
|
||||
}
|
||||
|
||||
if (totalInterp == 0.f) {
|
||||
x74_basewidget_freelookleft->SetVisibility(false, ETraversalMode::Children);
|
||||
x80_basewidget_freelookright->SetVisibility(false, ETraversalMode::Children);
|
||||
} else {
|
||||
x74_basewidget_freelookleft->SetVisibility(true, ETraversalMode::Children);
|
||||
x80_basewidget_freelookright->SetVisibility(true, ETraversalMode::Children);
|
||||
}
|
||||
const bool visible = totalInterp != 0.0f;
|
||||
x74_basewidget_freelookleft->SetVisibility(visible, ETraversalMode::Children);
|
||||
x80_basewidget_freelookright->SetVisibility(visible, ETraversalMode::Children);
|
||||
}
|
||||
|
||||
CHudFreeLookInterfaceXRay::CHudFreeLookInterfaceXRay(CGuiFrame& selHud, bool inFreeLook, bool lookControlHeld,
|
||||
|
@ -146,10 +142,8 @@ void CHudFreeLookInterfaceXRay::SetFreeLookState(bool inFreeLook, bool lookContr
|
|||
color.a() = x1c_freeLookInterp;
|
||||
x24_basewidget_freelook->SetColor(color);
|
||||
|
||||
if (x1c_freeLookInterp == 0.f)
|
||||
x24_basewidget_freelook->SetVisibility(false, ETraversalMode::Children);
|
||||
else
|
||||
x24_basewidget_freelook->SetVisibility(true, ETraversalMode::Children);
|
||||
const bool visible = x1c_freeLookInterp != 0.0f;
|
||||
x24_basewidget_freelook->SetVisibility(visible, ETraversalMode::Children);
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
|
|
Loading…
Reference in New Issue