]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_backend.c
Lots of minor fixes and improvements to the sound engine, plus a few more important...
[xonotic/darkplaces.git] / gl_backend.c
index 584acfdc60677e9a398c1a25878605950f4accd7..7dd9fefb21ac66d1efe9a48ed046bccfd7cd92c2 100644 (file)
@@ -1293,7 +1293,7 @@ void SCR_DrawScreen (void)
                        if (r_stereo_sidebyside.integer)
                        {
                                r_refdef.width = vid.realwidth * size / 2.5;
-                               r_refdef.height = vid.realheight * size / 2.5;
+                               r_refdef.height = vid.realheight * size / 2.5 * (1 - bound(0, r_letterbox.value, 100) / 100);
                                r_refdef.x = (vid.realwidth - r_refdef.width * 2.5) * 0.5;
                                r_refdef.y = (vid.realheight - r_refdef.height)/2;
                                if (r_stereo_side)
@@ -1302,7 +1302,7 @@ void SCR_DrawScreen (void)
                        else
                        {
                                r_refdef.width = vid.realwidth * size;
-                               r_refdef.height = vid.realheight * size;
+                               r_refdef.height = vid.realheight * size * (1 - bound(0, r_letterbox.value, 100) / 100);
                                r_refdef.x = (vid.realwidth - r_refdef.width)/2;
                                r_refdef.y = (vid.realheight - r_refdef.height)/2;
                        }
@@ -1363,6 +1363,15 @@ void SCR_UpdateScreen (void)
        if (gl_combine.integer && (!gl_combine_extension || r_textureunits.integer < 2))
                Cvar_SetValueQuick(&gl_combine, 0);
 
+       // don't allow cheats in multiplayer
+       if (!cl.islocalgame && cl.worldmodel)
+       {
+               if (r_fullbright.integer != 0)
+                       Cvar_Set ("r_fullbright", "0");
+               if (r_ambient.value != 0)
+                       Cvar_Set ("r_ambient", "0");
+       }
+
        // bound viewsize
        if (scr_viewsize.value < 30)
                Cvar_Set ("viewsize","30");