CPlayer: Make nearby variables const

Makes nearby variables from the previous change const to make their
immutability explicit.
This commit is contained in:
Lioncash 2020-03-06 22:08:54 -05:00
parent a2b6b4515d
commit 830e1c59d2
1 changed files with 5 additions and 5 deletions

View File

@ -1688,16 +1688,16 @@ void CPlayer::ProcessInput(const CFinalInput& input, CStateManager& mgr) {
if (x2f8_morphBallState == EPlayerMorphBallState::Unmorphed && x4a0_failsafeTest->Passes()) {
auto* prim = static_cast<const CCollidableAABox*>(GetCollisionPrimitive());
zeus::CAABox tmpAABB(prim->GetBox().min - 0.2f, prim->GetBox().max + 0.2f);
CCollidableAABox tmpBox(tmpAABB, prim->GetMaterial());
const zeus::CAABox tmpAABB(prim->GetBox().min - 0.2f, prim->GetBox().max + 0.2f);
const CCollidableAABox tmpBox(tmpAABB, prim->GetMaterial());
CPhysicsActor::Stop();
zeus::CAABox testBounds = prim->GetBox().getTransformedAABox(x34_transform);
zeus::CAABox expandedBounds(testBounds.min - 3.f, testBounds.max + 3.f);
const zeus::CAABox testBounds = prim->GetBox().getTransformedAABox(x34_transform);
const zeus::CAABox expandedBounds(testBounds.min - 3.f, testBounds.max + 3.f);
CAreaCollisionCache cache(expandedBounds);
CGameCollision::BuildAreaCollisionCache(mgr, cache);
rstl::reserved_vector<TUniqueId, 1024> nearList;
mgr.BuildColliderList(nearList, *this, expandedBounds);
std::optional<zeus::CVector3f> nonIntVec =
const std::optional<zeus::CVector3f> nonIntVec =
CGameCollision::FindNonIntersectingVector(mgr, cache, *this, tmpBox, nearList);
if (nonIntVec) {
x4a0_failsafeTest->Reset();