]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - r_crosshairs.c
A few casts and variable type changes to get rid of warnings on Win64. By Willis
[xonotic/darkplaces.git] / r_crosshairs.c
index 9e4e9c8148e9ffc151fc7e95d49eb24b70eef664..aeec2190f6a16199d0d420daaa006b2eca7193e3 100644 (file)
@@ -72,13 +72,13 @@ void R_DrawWorldCrosshair(void)
                return;
        if (!cl.viewentity || !cl_entities[cl.viewentity].state_current.active)
                return;
-       pic = Draw_CachePic(va("gfx/crosshair%i.tga", num), true);
+       pic = Draw_CachePic(va("gfx/crosshair%i", num), true);
        if (!pic)
                return;
        R_GetCrosshairColor(color);
 
        // trace the shot path up to a certain distance
-       VectorCopy(cl_entities[cl.viewentity].render.origin, v1);
+       Matrix4x4_OriginFromMatrix(&cl_entities[cl.viewentity].render.matrix, v1);
        v1[2] += 16; // HACK: this depends on the QC
 
        // get the forward vector for the gun (not the view)
@@ -107,7 +107,7 @@ void R_Draw2DCrosshair(void)
                return;
        if (!cl.viewentity || !cl_entities[cl.viewentity].state_current.active)
                return;
-       pic = Draw_CachePic(va("gfx/crosshair%i.tga", num), true);
+       pic = Draw_CachePic(va("gfx/crosshair%i", num), true);
        if (pic)
        {
                R_GetCrosshairColor(color);