]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
bring back the stupid Matrix4x4_Invert call as it breaks on my gcc in release builds...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 3 Mar 2009 09:05:48 +0000 (09:05 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 3 Mar 2009 09:05:48 +0000 (09:05 +0000)
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.2-1ubuntu11' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu11)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8773 d7cf8633-e32d-0410-b094-e92efae38249

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]);