]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/view.qc
Make uses of R_BeginPolygon explicit as to whether they're 2D or 3D
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / view.qc
index 66f80ad2c45b878fdafc3a9ea070fde4ef29c2ec..a2876e5f70601b31427c7d1a19486075688c7cb2 100644 (file)
@@ -48,7 +48,7 @@
 #define EFMASK_CHEAP (EF_ADDITIVE | EF_DOUBLESIDED | EF_FULLBRIGHT | EF_NODEPTHTEST | EF_NODRAW | EF_NOSHADOW | EF_SELECTABLE | EF_TELEPORT_BIT)
 
 float autocvar_cl_viewmodel_scale;
-float autocvar_cl_viewmodel_alpha;
+float autocvar_cl_viewmodel_alpha = 1;
 
 bool autocvar_cl_bobmodel;
 float autocvar_cl_bobmodel_speed;
@@ -1722,7 +1722,7 @@ void View_NightVision()
        tc_10 = '1.5 0 0' - '0.2 0 0' * sin(time * 0.5) + '0 0.5 0' * cos(time * 1.7);
        //tc_11 = '1 1 0' + '0.6 0 0' * sin(time * 0.6) + '0 0.3 0' * cos(time * 0.1);
        tc_11 = tc_01 + tc_10 - tc_00;
-       R_BeginPolygon("gfx/nightvision-bg.tga", DRAWFLAG_ADDITIVE);
+       R_BeginPolygon("gfx/nightvision-bg.tga", DRAWFLAG_ADDITIVE, true);
        R_PolygonVertex('0 0 0', tc_00, rgb, a);
        R_PolygonVertex(autocvar_vid_conwidth * '1 0 0', tc_10, rgb, a);
        R_PolygonVertex(autocvar_vid_conwidth * '1 0 0' + autocvar_vid_conheight * '0 1 0', tc_11, rgb, a);
@@ -1736,7 +1736,7 @@ void View_NightVision()
        tc_01 = tc_00 + '0 3 0' * (1 + Noise_White(nightvision_noise2, frametime) * 0.2);
        tc_10 = tc_00 + '2 0 0' * (1 + Noise_White(nightvision_noise2, frametime) * 0.3);
        tc_11 = tc_01 + tc_10 - tc_00;
-       R_BeginPolygon("gfx/nightvision-fg.tga", DRAWFLAG_ADDITIVE);
+       R_BeginPolygon("gfx/nightvision-fg.tga", DRAWFLAG_ADDITIVE, true);
        R_PolygonVertex('0 0 0', tc_00, rgb, a);
        R_PolygonVertex(autocvar_vid_conwidth * '1 0 0', tc_10, rgb, a);
        R_PolygonVertex(autocvar_vid_conwidth * '1 0 0' + autocvar_vid_conheight * '0 1 0', tc_11, rgb, a);