]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
make GL_SetupView_Orientation_FromEntity not blow away the model matrix
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 18 Jan 2008 11:44:31 +0000 (11:44 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 18 Jan 2008 11:44:31 +0000 (11:44 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7973 d7cf8633-e32d-0410-b094-e92efae38249

gl_backend.c

index f79f5a2102daa23207d9f0399839cc57e0220713..70abc13c36c9bbcfd7bf29fa82cdbe692c43dffd 100644 (file)
@@ -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)