From 5b68158736ab928b1129e8c6775d014a287e6aac Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Tue, 26 Jul 2016 16:09:04 -0600 Subject: [PATCH] light: fix _project_mangle to be consistent with "mangle" (yaw pitch roll) --- light/entities.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/light/entities.cc b/light/entities.cc index 6e6b2642..5eea413a 100644 --- a/light/entities.cc +++ b/light/entities.cc @@ -694,9 +694,9 @@ void Matrix4x4_CM_ModelViewMatrix(float *modelview, const vec3_t viewangles, con //figure out the current modelview matrix //I would if some of these, but then I'd still need a couple of copys - Matrix4_Multiply(modelview, Matrix4x4_CM_NewRotation(t2, -viewangles[2], 1, 0, 0), tempmat); - Matrix4_Multiply(tempmat, Matrix4x4_CM_NewRotation(t2, -viewangles[0], 0, 1, 0), modelview); - Matrix4_Multiply(modelview, Matrix4x4_CM_NewRotation(t2, -viewangles[1], 0, 0, 1), tempmat); + Matrix4_Multiply(modelview, Matrix4x4_CM_NewRotation(t2, -viewangles[2], 1, 0, 0), tempmat); //roll + Matrix4_Multiply(tempmat, Matrix4x4_CM_NewRotation(t2, viewangles[1], 0, 1, 0), modelview); //pitch + Matrix4_Multiply(modelview, Matrix4x4_CM_NewRotation(t2, -viewangles[0], 0, 0, 1), tempmat); //yaw Matrix4_Multiply(tempmat, Matrix4x4_CM_NewTranslation(t2, -vieworg[0], -vieworg[1], -vieworg[2]), modelview); // put Z going up }