From dd602eb4a4064537fbe86f6539b9fc39b3245b85 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sun, 6 Oct 2019 15:49:01 +0300 Subject: Fixing ColPoints again --- src/math/Matrix.h | 4 ++-- src/math/math.cpp | 4 ++-- src/vehicles/Automobile.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/math/Matrix.h b/src/math/Matrix.h index 5145f0ac..b4a866a0 100644 --- a/src/math/Matrix.h +++ b/src/math/Matrix.h @@ -256,8 +256,8 @@ CMatrix &Invert(const CMatrix &src, CMatrix &dst); CVector operator*(const CMatrix &mat, const CVector &vec); CMatrix operator*(const CMatrix &m1, const CMatrix &m2); CVector MultiplyInverse(const CMatrix &mat, const CVector &vec); -CVector Multiply3x3(const CMatrix &mat, const CVector &vec); -CVector Multiply3x3(const CVector &vec, const CMatrix &mat); +const CVector Multiply3x3(const CMatrix &mat, const CVector &vec); +const CVector Multiply3x3(const CVector &vec, const CMatrix &mat); inline CMatrix Invert(const CMatrix &matrix) diff --git a/src/math/math.cpp b/src/math/math.cpp index 0707e3d2..6201cee6 100644 --- a/src/math/math.cpp +++ b/src/math/math.cpp @@ -136,7 +136,7 @@ MultiplyInverse(const CMatrix &mat, const CVector &vec) mat.m_matrix.at.x * v.x + mat.m_matrix.at.y * v.y + mat.m_matrix.at.z * v.z); } -CVector +const CVector Multiply3x3(const CMatrix &mat, const CVector &vec) { return CVector( @@ -145,7 +145,7 @@ Multiply3x3(const CMatrix &mat, const CVector &vec) mat.m_matrix.right.z * vec.x + mat.m_matrix.up.z * vec.y + mat.m_matrix.at.z * vec.z); } -CVector +const CVector Multiply3x3(const CVector &vec, const CMatrix &mat) { return CVector( diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp index 00dc73fc..2329a9d9 100644 --- a/src/vehicles/Automobile.cpp +++ b/src/vehicles/Automobile.cpp @@ -1934,7 +1934,7 @@ CAutomobile::Render(void) CVector rearWheelFwd = GetForward(); for(i = 0; i < 4; i++){ if (m_aWheelTimer[i] > 0.0f) { - contactPoints[i] = m_aWheelColPoints[0].point - GetPosition(); + contactPoints[i] = m_aWheelColPoints[i].point - GetPosition(); contactSpeeds[i] = GetSpeed(contactPoints[i]); if (i == CARWHEEL_FRONT_LEFT || i == CARWHEEL_FRONT_RIGHT) m_aWheelSpeed[i] = ProcessWheelRotation(m_aWheelState[i], frontWheelFwd, contactSpeeds[i], 0.5f*mi->m_wheelScale); -- cgit v1.2.3