]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
thanks to Tomaz for finding a severe bug in CopyTranslateOnly (it was copying the...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 11 Nov 2002 05:04:53 +0000 (05:04 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 11 Nov 2002 05:04:53 +0000 (05:04 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2619 d7cf8633-e32d-0410-b094-e92efae38249

matrixlib.c

index 8b7f22bbe5a86c8d729ec79b7ecf992b2a53e9b8..7d6db2ece7ff67903264812d67b0184bdd630fbb 100644 (file)
@@ -37,11 +37,11 @@ void Matrix4x4_CopyTranslateOnly (matrix4x4_t *out, const matrix4x4_t *in)
        out->m[1][0] = 0.0f;
        out->m[1][1] = 0.0f;
        out->m[1][2] = 0.0f;
-       out->m[1][3] = in->m[0][3];
+       out->m[1][3] = in->m[1][3];
        out->m[2][0] = 0.0f;
        out->m[2][1] = 0.0f;
        out->m[2][2] = 0.0f;
-       out->m[2][3] = in->m[0][3];
+       out->m[2][3] = in->m[2][3];
        out->m[3][0] = 0.0f;
        out->m[3][1] = 0.0f;
        out->m[3][2] = 0.0f;
@@ -465,11 +465,11 @@ void Matrix3x4_CopyTranslateOnly (matrix3x4_t *out, const matrix3x4_t *in)
        out->m[1][0] = 0.0f;
        out->m[1][1] = 0.0f;
        out->m[1][2] = 0.0f;
-       out->m[1][3] = in->m[0][3];
+       out->m[1][3] = in->m[1][3];
        out->m[2][0] = 0.0f;
        out->m[2][1] = 0.0f;
        out->m[2][2] = 0.0f;
-       out->m[2][3] = in->m[0][3];
+       out->m[2][3] = in->m[2][3];
 }
 
 void Matrix3x4_FromMatrix4x4 (matrix3x4_t *out, const matrix4x4_t *in)