From 99919da9f84281fb4b3372a570d459d4d7cdb53f Mon Sep 17 00:00:00 2001 From: havoc Date: Mon, 11 Nov 2002 05:04:53 +0000 Subject: [PATCH] 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 --- matrixlib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) -- 2.39.2