mirror of https://github.com/AxioDL/metaforce.git
CMorphBall: Take torque by const reference in SpinToSpeed()
Same behavior, minus unnecessary copies and consistency with the rest of the API.
This commit is contained in:
parent
37138fb584
commit
0af9b16b92
|
@ -2176,7 +2176,7 @@ void CMorphBall::ApplyGravity(CStateManager& mgr) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMorphBall::SpinToSpeed(float holdMag, zeus::CVector3f torque, float mag) {
|
void CMorphBall::SpinToSpeed(float holdMag, const zeus::CVector3f& torque, float mag) {
|
||||||
x0_player.ApplyTorqueWR(torque * ((holdMag - x0_player.GetAngularVelocityWR().getVector().magnitude()) * mag));
|
x0_player.ApplyTorqueWR(torque * ((holdMag - x0_player.GetAngularVelocityWR().getVector().magnitude()) * mag));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -250,7 +250,7 @@ public:
|
||||||
const CStateManager& mgr);
|
const CStateManager& mgr);
|
||||||
float CalculateSurfaceFriction() const;
|
float CalculateSurfaceFriction() const;
|
||||||
void ApplyGravity(CStateManager& mgr);
|
void ApplyGravity(CStateManager& mgr);
|
||||||
void SpinToSpeed(float holdMag, zeus::CVector3f torque, float mag);
|
void SpinToSpeed(float holdMag, const zeus::CVector3f& torque, float mag);
|
||||||
float ComputeMaxSpeed() const;
|
float ComputeMaxSpeed() const;
|
||||||
void Touch(CActor& actor, CStateManager& mgr);
|
void Touch(CActor& actor, CStateManager& mgr);
|
||||||
bool IsClimbable(const CCollisionInfo& cinfo) const;
|
bool IsClimbable(const CCollisionInfo& cinfo) const;
|
||||||
|
|
Loading…
Reference in New Issue