From ecbcb86bc59c137ef375e35c4c942fa88d2d3aca Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 7 May 2020 12:18:57 -0400 Subject: [PATCH] CScriptSpawnPoint: Brace conditionals where applicable --- Runtime/World/CScriptSpawnPoint.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Runtime/World/CScriptSpawnPoint.cpp b/Runtime/World/CScriptSpawnPoint.cpp index 5bcf43caa..7b22469a9 100644 --- a/Runtime/World/CScriptSpawnPoint.cpp +++ b/Runtime/World/CScriptSpawnPoint.cpp @@ -62,9 +62,10 @@ void CScriptSpawnPoint::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objI player->Teleport(GetTransform(), stateMgr, true); player->SetSpawnedMorphBallState(CPlayer::EPlayerMorphBallState(x10c_25_morphed), stateMgr); - if (area->IsPostConstructed() && area->GetOcclusionState() == CGameArea::EOcclusionState::Visible) + if (area->IsPostConstructed() && area->GetOcclusionState() == CGameArea::EOcclusionState::Visible) { CWorld::PropogateAreaChain(CGameArea::EOcclusionState::Occluded, stateMgr.GetWorld()->GetArea(stateMgr.GetNextAreaId()), stateMgr.GetWorld()); + } } else { player->Teleport(GetTransform(), stateMgr, true); player->SetSpawnedMorphBallState(CPlayer::EPlayerMorphBallState(x10c_25_morphed), stateMgr); @@ -76,9 +77,10 @@ void CScriptSpawnPoint::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objI } u32 CScriptSpawnPoint::GetPowerup(CPlayerState::EItemType item) const { - int idx = int(item); - if (idx >= int(CPlayerState::EItemType::Max) || idx < 0) + const auto idx = static_cast(item); + if (item >= CPlayerState::EItemType::Max || idx < 0) { return x64_itemCounts.front(); + } return x64_itemCounts[idx]; } } // namespace urde