mirror of https://github.com/AxioDL/metaforce.git
CKnockBackController: Make GetKnockBackCharacterState() a const member function
This doesn't modify internal instance state, so this can be made const.
This commit is contained in:
parent
529d7e58bd
commit
49cc019699
|
@ -400,9 +400,10 @@ bool CKnockBackController::TickDeferredTimer(float dt) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
EKnockBackCharacterState CKnockBackController::GetKnockBackCharacterState(CPatterned& parent) {
|
EKnockBackCharacterState CKnockBackController::GetKnockBackCharacterState(const CPatterned& parent) const {
|
||||||
if (parent.GetBodyController()->IsFrozen())
|
if (parent.GetBodyController()->IsFrozen()) {
|
||||||
return parent.IsAlive() ? EKnockBackCharacterState::FrozenAlive : EKnockBackCharacterState::FrozenDead;
|
return parent.IsAlive() ? EKnockBackCharacterState::FrozenAlive : EKnockBackCharacterState::FrozenDead;
|
||||||
|
}
|
||||||
return parent.IsAlive() ? EKnockBackCharacterState::Alive : EKnockBackCharacterState::Dead;
|
return parent.IsAlive() ? EKnockBackCharacterState::Alive : EKnockBackCharacterState::Dead;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ private:
|
||||||
bool x82_26_locomotionDuringElectrocution : 1;
|
bool x82_26_locomotionDuringElectrocution : 1;
|
||||||
void ApplyImpulse(float dt, CPatterned& parent);
|
void ApplyImpulse(float dt, CPatterned& parent);
|
||||||
bool TickDeferredTimer(float dt);
|
bool TickDeferredTimer(float dt);
|
||||||
EKnockBackCharacterState GetKnockBackCharacterState(CPatterned& parent);
|
EKnockBackCharacterState GetKnockBackCharacterState(const CPatterned& parent) const;
|
||||||
void ValidateState(CPatterned& parent);
|
void ValidateState(CPatterned& parent);
|
||||||
float CalculateExtraHurlVelocity(CStateManager& mgr, float magnitude, float kbResistance);
|
float CalculateExtraHurlVelocity(CStateManager& mgr, float magnitude, float kbResistance);
|
||||||
void DoKnockBackAnimation(const zeus::CVector3f& backVec, CStateManager& mgr, CPatterned& parent, float magnitude);
|
void DoKnockBackAnimation(const zeus::CVector3f& backVec, CStateManager& mgr, CPatterned& parent, float magnitude);
|
||||||
|
|
Loading…
Reference in New Issue