From 0e5fb63a759093acf863fc2cf0fca0284a3a5768 Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 18 Jan 2008 11:44:31 +0000 Subject: [PATCH] make GL_SetupView_Orientation_FromEntity not blow away the model matrix git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7973 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_backend.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gl_backend.c b/gl_backend.c index f79f5a21..70abc13c 100644 --- a/gl_backend.c +++ b/gl_backend.c @@ -299,7 +299,11 @@ void GL_SetupView_Orientation_FromEntity(const matrix4x4_t *matrix) //Matrix4x4_ConcatRotate(&backend_viewmatrix, -angles[0], 0, 1, 0); //Matrix4x4_ConcatRotate(&backend_viewmatrix, -angles[1], 0, 0, 1); //Matrix4x4_ConcatTranslate(&backend_viewmatrix, -origin[0], -origin[1], -origin[2]); + + // force an update of the model matrix by copying it off, resetting it, and then calling the R_Mesh_Matrix function with it + tempmatrix = backend_modelmatrix; memset(&backend_modelmatrix, 0, sizeof(backend_modelmatrix)); + R_Mesh_Matrix(&tempmatrix); } void GL_SetupView_Mode_Perspective (double frustumx, double frustumy, double zNear, double zFar) -- 2.39.2