]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix showtex
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 6 Nov 2011 14:24:59 +0000 (14:24 +0000)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 6 Nov 2011 14:23:19 +0000 (15:23 +0100)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11530 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=db7d2f7ea9647a7b119054141755aedf752e8719

sbar.c

diff --git a/sbar.c b/sbar.c
index 188c4e23a5f2263669a3663ef1dbbb3022e1af98..3d9d05e4d5399f1059bade1196ae10597445311b 100644 (file)
--- a/sbar.c
+++ b/sbar.c
@@ -1207,14 +1207,18 @@ void Sbar_ShowFPS(void)
        }
        if (showtex.integer)
        {
+               vec3_t org;
                vec3_t dest;
+               vec3_t temp;
                trace_t trace;
 
-               VectorMA(r_refdef.view.origin, 65536, r_refdef.view.forward, dest);
+               Matrix4x4_OriginFromMatrix(&r_refdef.view.matrix, org);
+               VectorSet(temp, 65536, 0, 0);
+               Matrix4x4_Transform(&r_refdef.view.matrix, temp, dest);
                trace.hittexture = NULL; // to make sure
                // TODO change this trace to be stopped by anything "visible" (i.e. with a drawsurface), but not stuff like weapclip
                // probably needs adding a new SUPERCONTENTS type
-               trace = CL_TraceLine(r_refdef.view.origin, dest, MOVE_NORMAL, NULL, SUPERCONTENTS_SOLID, true, false, NULL, true, true);
+               trace = CL_TraceLine(org, dest, MOVE_NORMAL, NULL, SUPERCONTENTS_SOLID, true, false, NULL, true, true);
                if(trace.hittexture)
                        strlcpy(texstring, trace.hittexture->name, sizeof(texstring));
                else