From ed231b85e93698dff07d8f016c61f96aea190fae Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 7 May 2020 07:43:33 -0400 Subject: [PATCH] CScriptCameraPitchVolume: Brace statements where applicable Makes the code consistent. --- Runtime/World/CScriptCameraPitchVolume.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Runtime/World/CScriptCameraPitchVolume.cpp b/Runtime/World/CScriptCameraPitchVolume.cpp index 7bbbc76a9..71454cdb3 100644 --- a/Runtime/World/CScriptCameraPitchVolume.cpp +++ b/Runtime/World/CScriptCameraPitchVolume.cpp @@ -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 CScriptCameraPitchVolume::GetTouchBounds() const { } void CScriptCameraPitchVolume::Touch(CActor& act, CStateManager& mgr) { - TCastToPtr pl(act); - if (!pl) + const TCastToConstPtr 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()); }