mirror of https://github.com/AxioDL/metaforce.git
CScriptCameraPitchVolume: Brace statements where applicable
Makes the code consistent.
This commit is contained in:
parent
dab1784302
commit
ed231b85e9
|
@ -27,13 +27,15 @@ CScriptCameraPitchVolume::CScriptCameraPitchVolume(TUniqueId uid, bool active, s
|
|||
void CScriptCameraPitchVolume::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||
|
||||
void CScriptCameraPitchVolume::Think(float, CStateManager& mgr) {
|
||||
if (!GetActive())
|
||||
if (!GetActive()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (x13c_24_entered && !x13c_25_occupied)
|
||||
if (x13c_24_entered && !x13c_25_occupied) {
|
||||
Entered(mgr);
|
||||
else if (!x13c_24_entered && x13c_25_occupied)
|
||||
} else if (!x13c_24_entered && x13c_25_occupied) {
|
||||
Exited(mgr);
|
||||
}
|
||||
|
||||
x13c_24_entered = false;
|
||||
}
|
||||
|
@ -43,13 +45,15 @@ std::optional<zeus::CAABox> CScriptCameraPitchVolume::GetTouchBounds() const {
|
|||
}
|
||||
|
||||
void CScriptCameraPitchVolume::Touch(CActor& act, CStateManager& mgr) {
|
||||
TCastToPtr<CPlayer> pl(act);
|
||||
if (!pl)
|
||||
const TCastToConstPtr<CPlayer> pl(act);
|
||||
if (!pl) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto plBox = pl->GetTouchBounds();
|
||||
if (!plBox)
|
||||
const auto plBox = pl->GetTouchBounds();
|
||||
if (!plBox) {
|
||||
return;
|
||||
}
|
||||
|
||||
x13c_24_entered = xe8_obbox.AABoxIntersectsBox(plBox.value());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue