From fad980dc19576ef76c58a09e09ee3ef024b7d372 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 25 Mar 2020 01:39:05 -0400 Subject: [PATCH] CBodyController: Make HasBodyInfo() accept a const reference This only queries state and doesn't actually modify it. --- Runtime/Character/CBodyController.cpp | 4 ++-- Runtime/Character/CBodyController.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Runtime/Character/CBodyController.cpp b/Runtime/Character/CBodyController.cpp index a37e7ac21..ddd92cf35 100644 --- a/Runtime/Character/CBodyController.cpp +++ b/Runtime/Character/CBodyController.cpp @@ -142,8 +142,8 @@ void CBodyController::FaceDirection3D(const zeus::CVector3f& v0, const zeus::CVe } } -bool CBodyController::HasBodyInfo(CActor& act) { - return act.GetModelData()->GetAnimationData()->GetCharacterInfo().GetPASDatabase().GetNumAnimStates() != 0; +bool CBodyController::HasBodyInfo(const CActor& actor) { + return actor.GetModelData()->GetAnimationData()->GetCharacterInfo().GetPASDatabase().GetNumAnimStates() != 0; } void CBodyController::PlayBestAnimation(const CPASAnimParmData& parms, CRandom16& r) { diff --git a/Runtime/Character/CBodyController.hpp b/Runtime/Character/CBodyController.hpp index e546a2bf2..ac9839dae 100644 --- a/Runtime/Character/CBodyController.hpp +++ b/Runtime/Character/CBodyController.hpp @@ -86,7 +86,7 @@ public: void SetDeltaRotation(const zeus::CQuaternion& q) { x2dc_rot *= q; } void FaceDirection(const zeus::CVector3f& v0, float dt); void FaceDirection3D(const zeus::CVector3f& v0, const zeus::CVector3f& v1, float dt); - static bool HasBodyInfo(CActor& act); + static bool HasBodyInfo(const CActor& actor); const CPASDatabase& GetPASDatabase() const; void PlayBestAnimation(const CPASAnimParmData& parms, CRandom16& r); void LoopBestAnimation(const CPASAnimParmData& parms, CRandom16& r);