From: havoc Date: Fri, 18 Jan 2008 11:44:31 +0000 (+0000) Subject: make GL_SetupView_Orientation_FromEntity not blow away the model matrix X-Git-Tag: xonotic-v0.1.0preview~2535 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0e5fb63a759093acf863fc2cf0fca0284a3a5768;p=xonotic%2Fdarkplaces.git 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 --- 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)