light: fix _project_mangle to be consistent with "mangle" (yaw pitch roll)

This commit is contained in:
Eric Wasylishen 2016-07-26 16:09:04 -06:00
parent 1e0b34b4d2
commit 5b68158736
1 changed files with 3 additions and 3 deletions

View File

@ -694,9 +694,9 @@ void Matrix4x4_CM_ModelViewMatrix(float *modelview, const vec3_t viewangles, con
//figure out the current modelview matrix //figure out the current modelview matrix
//I would if some of these, but then I'd still need a couple of copys //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(modelview, Matrix4x4_CM_NewRotation(t2, -viewangles[2], 1, 0, 0), tempmat); //roll
Matrix4_Multiply(tempmat, Matrix4x4_CM_NewRotation(t2, -viewangles[0], 0, 1, 0), modelview); Matrix4_Multiply(tempmat, Matrix4x4_CM_NewRotation(t2, viewangles[1], 0, 1, 0), modelview); //pitch
Matrix4_Multiply(modelview, Matrix4x4_CM_NewRotation(t2, -viewangles[1], 0, 0, 1), tempmat); 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 Matrix4_Multiply(tempmat, Matrix4x4_CM_NewTranslation(t2, -vieworg[0], -vieworg[1], -vieworg[2]), modelview); // put Z going up
} }