2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 21:07:42 +00:00

CKnockBackController: Make use of const references where applicable

In many cases the CPatterned& parameter is only used for read-only
querying. We can make this explicit in the interface.
This commit is contained in:
Lioncash
2020-04-17 01:03:10 -04:00
parent 49cc019699
commit b55d1e4c77
2 changed files with 15 additions and 12 deletions

View File

@@ -100,13 +100,13 @@ private:
void ApplyImpulse(float dt, CPatterned& parent);
bool TickDeferredTimer(float dt);
EKnockBackCharacterState GetKnockBackCharacterState(const CPatterned& parent) const;
void ValidateState(CPatterned& parent);
void ValidateState(const CPatterned& parent);
float CalculateExtraHurlVelocity(CStateManager& mgr, float magnitude, float kbResistance);
void DoKnockBackAnimation(const zeus::CVector3f& backVec, CStateManager& mgr, CPatterned& parent, float magnitude);
void ResetKnockBackImpulse(CPatterned& parent, const zeus::CVector3f& backVec, float magnitude);
void ResetKnockBackImpulse(const CPatterned& parent, const zeus::CVector3f& backVec, float magnitude);
void DoDeferredKnockBack(CStateManager& mgr, CPatterned& parent);
EKnockBackWeaponType GetKnockBackWeaponType(const CDamageInfo& info, EWeaponType wType, EKnockBackType type);
void SelectDamageState(CPatterned& parent, const CDamageInfo& info, EWeaponType wType, EKnockBackType type);
void SelectDamageState(const CPatterned& parent, const CDamageInfo& info, EWeaponType wType, EKnockBackType type);
public:
explicit CKnockBackController(EKnockBackVariant variant);