From e8dc27bfaa09ec44af41e377fca1edfaf596d73c Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 7 May 2020 08:01:35 -0400 Subject: [PATCH] CScriptAiJumpPoint: Brace statements where applicable Makes the code consistent. --- Runtime/World/CScriptAiJumpPoint.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Runtime/World/CScriptAiJumpPoint.cpp b/Runtime/World/CScriptAiJumpPoint.cpp index 20b35dc32..8d4ab9967 100644 --- a/Runtime/World/CScriptAiJumpPoint.cpp +++ b/Runtime/World/CScriptAiJumpPoint.cpp @@ -17,8 +17,9 @@ CScriptAiJumpPoint::CScriptAiJumpPoint(TUniqueId uid, std::string_view name, con void CScriptAiJumpPoint::Accept(IVisitor& visitor) { visitor.Visit(this); } void CScriptAiJumpPoint::Think(float dt, CStateManager&) { - if (x110_timeRemaining <= 0) + if (x110_timeRemaining <= 0) { return; + } x110_timeRemaining -= dt; } @@ -26,15 +27,16 @@ void CScriptAiJumpPoint::Think(float dt, CStateManager&) { void CScriptAiJumpPoint::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId other, CStateManager& mgr) { CActor::AcceptScriptMsg(msg, other, mgr); - if (msg != EScriptObjectMessage::InitializedInArea) + if (msg != EScriptObjectMessage::InitializedInArea) { return; + } for (SConnection& conn : x20_conns) { - if (conn.x0_state != EScriptObjectState::Arrived || conn.x4_msg != EScriptObjectMessage::Next) + if (conn.x0_state != EScriptObjectState::Arrived || conn.x4_msg != EScriptObjectMessage::Next) { continue; + } - const CScriptWaypoint* wpnt = - static_cast(mgr.GetObjectById(mgr.GetIdForScript(conn.x8_objId))); + const auto* wpnt = static_cast(mgr.GetObjectById(mgr.GetIdForScript(conn.x8_objId))); if (wpnt) { x10c_currentWaypoint = wpnt->GetUniqueId(); x10e_nextWaypoint = wpnt->NextWaypoint(mgr);