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::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||||
|
|
||||||
void CScriptCameraPitchVolume::Think(float, CStateManager& mgr) {
|
void CScriptCameraPitchVolume::Think(float, CStateManager& mgr) {
|
||||||
if (!GetActive())
|
if (!GetActive()) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (x13c_24_entered && !x13c_25_occupied)
|
if (x13c_24_entered && !x13c_25_occupied) {
|
||||||
Entered(mgr);
|
Entered(mgr);
|
||||||
else if (!x13c_24_entered && x13c_25_occupied)
|
} else if (!x13c_24_entered && x13c_25_occupied) {
|
||||||
Exited(mgr);
|
Exited(mgr);
|
||||||
|
}
|
||||||
|
|
||||||
x13c_24_entered = false;
|
x13c_24_entered = false;
|
||||||
}
|
}
|
||||||
|
@ -43,13 +45,15 @@ std::optional<zeus::CAABox> CScriptCameraPitchVolume::GetTouchBounds() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptCameraPitchVolume::Touch(CActor& act, CStateManager& mgr) {
|
void CScriptCameraPitchVolume::Touch(CActor& act, CStateManager& mgr) {
|
||||||
TCastToPtr<CPlayer> pl(act);
|
const TCastToConstPtr<CPlayer> pl(act);
|
||||||
if (!pl)
|
if (!pl) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto plBox = pl->GetTouchBounds();
|
const auto plBox = pl->GetTouchBounds();
|
||||||
if (!plBox)
|
if (!plBox) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
x13c_24_entered = xe8_obbox.AABoxIntersectsBox(plBox.value());
|
x13c_24_entered = xe8_obbox.AABoxIntersectsBox(plBox.value());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue