diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2019-10-26 16:20:31 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2019-10-26 16:20:31 +0200 |
commit | 3dee880c2941417c9e5ec42297da65f27ab9c5ca (patch) | |
tree | 93f0daf6f0fdc04fb2898a202157d3d9ec078ffb /src/math | |
parent | script 500-599 (diff) | |
parent | Fix hornPatternsArray (diff) | |
download | re3-3dee880c2941417c9e5ec42297da65f27ab9c5ca.tar re3-3dee880c2941417c9e5ec42297da65f27ab9c5ca.tar.gz re3-3dee880c2941417c9e5ec42297da65f27ab9c5ca.tar.bz2 re3-3dee880c2941417c9e5ec42297da65f27ab9c5ca.tar.lz re3-3dee880c2941417c9e5ec42297da65f27ab9c5ca.tar.xz re3-3dee880c2941417c9e5ec42297da65f27ab9c5ca.tar.zst re3-3dee880c2941417c9e5ec42297da65f27ab9c5ca.zip |
Diffstat (limited to 'src/math')
-rw-r--r-- | src/math/Matrix.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/math/Matrix.h b/src/math/Matrix.h index b4a866a0..96f56a0f 100644 --- a/src/math/Matrix.h +++ b/src/math/Matrix.h @@ -127,20 +127,14 @@ public: } void Scale(float scale) { - // GTA treats this as 4x4 floats - m_matrix.right.x *= scale; - m_matrix.right.y *= scale; - m_matrix.right.z *= scale; - m_matrix.up.x *= scale; - m_matrix.up.y *= scale; - m_matrix.up.z *= scale; - m_matrix.at.x *= scale; - m_matrix.at.y *= scale; - m_matrix.at.z *= scale; - m_matrix.pos.x *= scale; - m_matrix.pos.y *= scale; - m_matrix.pos.z *= scale; - m_matrix.flags = 0; + float *pFloatMatrix = (float*)&m_matrix; + for (int i = 0; i < 3; i++) +#ifdef FIX_BUGS // BUGFIX from VC + for (int j = 0; j < 3; j++) +#else + for (int j = 0; j < 4; j++) +#endif + pFloatMatrix[i * 4 + j] *= scale; } |