cvar_t r_speeds2 = {"r_speeds2","0"};
cvar_t r_fullbright = {"r_fullbright","0"};
//cvar_t r_lightmap = {"r_lightmap","0"};
-//cvar_t r_shadows = {"r_shadows","0"};
+cvar_t r_shadows = {"r_shadows","0"};
cvar_t r_wateralpha = {"r_wateralpha","1"};
-//cvar_t r_dynamic = {"r_dynamic","1"};
+cvar_t r_dynamic = {"r_dynamic","1"};
cvar_t r_novis = {"r_novis","0"};
cvar_t r_waterripple = {"r_waterripple","0"};
cvar_t r_fullbrights = {"r_fullbrights", "1"};
cvar_t gl_lightmode = {"gl_lightmode", "1", TRUE}; // LordHavoc: overbright lighting
//cvar_t r_dynamicwater = {"r_dynamicwater", "1"};
//cvar_t r_dynamicbothsides = {"r_dynamicbothsides", "1"}; // LordHavoc: can disable dynamic lighting of backfaces, but quake maps are weird so it doesn't always work right...
+cvar_t r_farclip = {"r_farclip", "6144"};
cvar_t gl_fogenable = {"gl_fogenable", "0"};
cvar_t gl_fogdensity = {"gl_fogdensity", "0.25"};
glColor3f (1,1,1);
}
- /*
- if (r_shadows.value && !(currententity->effects & EF_ADDITIVE) && currententity != &cl.viewent)
+ if (!fogenabled && r_shadows.value && !(currententity->effects & EF_ADDITIVE) && currententity != &cl.viewent)
{
// flatten it to make a shadow
float *av = aliasvert + 2, l = lightspot[2] + 0.125;
glEnable (GL_TEXTURE_2D);
glColor3f (1,1,1);
}
- */
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable (GL_BLEND);
glColor3f (1,1,1);
}
- /*
- if (r_shadows.value && !(currententity->effects & EF_ADDITIVE) && currententity != &cl.viewent)
+ if (!fogenabled && r_shadows.value && !(currententity->effects & EF_ADDITIVE) && currententity != &cl.viewent)
{
int i;
float *av = aliasvert + 2, l = lightspot[2] + 0.125;
glEnable (GL_TEXTURE_2D);
glColor3f (1,1,1);
}
- */
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable (GL_BLEND);
// we can't dynamically colormap textures, so they are cached
// seperately for the players. Heads are just uncolored.
- if (currententity->colormap != vid.colormap/* && !gl_nocolors.value*/)
+ if (currententity->colormap != 0 /*vid.colormap*/ /* && !gl_nocolors.value*/)
{
i = currententity - cl_entities;
if (i >= 1 && i<=cl.maxclients /* && !strcmp (currententity->model->name, "progs/player.mdl") */)
- glBindTexture(GL_TEXTURE_2D, playertextures - 1 + i);
+ glBindTexture(GL_TEXTURE_2D, playertextures - 1 + i);
}
// if (gl_affinemodels.value)
{
// don't allow cheats in multiplayer
if (cl.maxclients > 1)
+ {
Cvar_Set ("r_fullbright", "0");
+ Cvar_Set ("r_ambient", "0");
+ }
R_AnimateLight ();
}
-void MYgluPerspective( GLdouble fovy, GLdouble aspect,
- GLdouble zNear, GLdouble zFar )
+void MYgluPerspective( GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar )
{
GLdouble xmin, xmax, ymin, ymax;
// if (skyname[0]) // skybox enabled?
// MYgluPerspective (r_refdef.fov_y, screenaspect, 4, r_skyboxsize.value*1.732050807569 + 256); // this is size*sqrt(3) + 256
// else
- MYgluPerspective (r_refdef.fov_y, screenaspect, 4, 6144);
+ MYgluPerspective (r_refdef.fov_y, screenaspect, 4, r_farclip.value);
glCullFace(GL_FRONT);