From: havoc Date: Mon, 11 Nov 2002 05:04:53 +0000 (+0000) Subject: thanks to Tomaz for finding a severe bug in CopyTranslateOnly (it was copying the... X-Git-Tag: RELEASE_0_2_0_RC1~72 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=99919da9f84281fb4b3372a570d459d4d7cdb53f;p=xonotic%2Fdarkplaces.git thanks to Tomaz for finding a severe bug in CopyTranslateOnly (it was copying the X translate into all 3 translate components) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2619 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/matrixlib.c b/matrixlib.c index 8b7f22bb..7d6db2ec 100644 --- a/matrixlib.c +++ b/matrixlib.c @@ -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)