]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - clvm_cmds.c
bring back the stupid Matrix4x4_Invert call as it breaks on my gcc in release builds...
[xonotic/darkplaces.git] / clvm_cmds.c
index 6642e533ddd87c9efa274e6d810e7e8060718c94..7849ffe2a29b846d032a1704bc334a798904f8dd 100644 (file)
@@ -942,10 +942,12 @@ static void VM_CL_project (void)
 {
        float   *f;
        vec3_t  v;
+       matrix4x4_t m;
 
        VM_SAFEPARMCOUNT(1, VM_CL_project);
        f = PRVM_G_VECTOR(OFS_PARM0);
-       Matrix4x4_Transform(&r_refdef.view.inverse_matrix, f, v);
+       Matrix4x4_Invert_Simple(&m, &r_refdef.view.matrix);
+       Matrix4x4_Transform(&m, f, v);
        if(v_flipped.integer)
                v[1] = -v[1];
        VectorSet(PRVM_G_VECTOR(OFS_RETURN), r_refdef.view.x + r_refdef.view.width*0.5*(1.0+v[1]/v[0]/-r_refdef.view.frustum_x), r_refdef.view.y + r_refdef.view.height*0.5*(1.0+v[2]/v[0]/-r_refdef.view.frustum_y), v[0]);