CBodyController: Make HasBodyInfo() accept a const reference

This only queries state and doesn't actually modify it.
This commit is contained in:
Lioncash 2020-03-25 01:39:05 -04:00
parent f875bdf024
commit fad980dc19
2 changed files with 3 additions and 3 deletions

View File

@ -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) {

View File

@ -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);