mirror of https://github.com/AxioDL/metaforce.git
CModVectorElement: Eliminate variable shadowing
Prevents "a" from clashing with a local variable.
This commit is contained in:
parent
9fa689a806
commit
31cf98646b
|
@ -96,15 +96,13 @@ bool CMVETimeChain::GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f&
|
|||
return x4_a->GetValue(frame, pVel, pPos);
|
||||
}
|
||||
|
||||
CMVEBounce::CMVEBounce(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CVectorElement>&& b,
|
||||
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d, bool e)
|
||||
: x4_planePoint(std::move(a))
|
||||
, x8_planeNormal(std::move(b))
|
||||
, xc_friction(std::move(c))
|
||||
, x10_restitution(std::move(d))
|
||||
, x14_planePrecomputed(false)
|
||||
, x15_dieOnPenetrate(e)
|
||||
, x24_planeD(0.0) {
|
||||
CMVEBounce::CMVEBounce(std::unique_ptr<CVectorElement>&& planePoint, std::unique_ptr<CVectorElement>&& planeNormal,
|
||||
std::unique_ptr<CRealElement>&& friction, std::unique_ptr<CRealElement>&& restitution, bool e)
|
||||
: x4_planePoint(std::move(planePoint))
|
||||
, x8_planeNormal(std::move(planeNormal))
|
||||
, xc_friction(std::move(friction))
|
||||
, x10_restitution(std::move(restitution))
|
||||
, x15_dieOnPenetrate(e) {
|
||||
if (x4_planePoint && x8_planeNormal && x4_planePoint->IsFastConstant() && x8_planeNormal->IsFastConstant()) {
|
||||
/* Precompute Hesse normal form of plane (for penetration testing)
|
||||
* https://en.wikipedia.org/wiki/Hesse_normal_form */
|
||||
|
|
|
@ -78,14 +78,14 @@ class CMVEBounce : public CModVectorElement {
|
|||
std::unique_ptr<CVectorElement> x8_planeNormal;
|
||||
std::unique_ptr<CRealElement> xc_friction;
|
||||
std::unique_ptr<CRealElement> x10_restitution;
|
||||
bool x14_planePrecomputed;
|
||||
bool x14_planePrecomputed = false;
|
||||
bool x15_dieOnPenetrate;
|
||||
zeus::CVector3f x18_planeValidatedNormal;
|
||||
float x24_planeD;
|
||||
float x24_planeD = 0.0f;
|
||||
|
||||
public:
|
||||
CMVEBounce(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CVectorElement>&& b,
|
||||
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d, bool e);
|
||||
CMVEBounce(std::unique_ptr<CVectorElement>&& planePoint, std::unique_ptr<CVectorElement>&& planeNormal,
|
||||
std::unique_ptr<CRealElement>&& friction, std::unique_ptr<CRealElement>&& restitution, bool e);
|
||||
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue