Corrects fog disabling when drawing fullbright shit. Fixes sky #93.

git-svn-id: https://svn.eduke32.com/eduke32@621 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
plagman 2008-02-18 07:55:08 +00:00
parent 3ca6158794
commit 519fa4cd81

View file

@ -169,7 +169,7 @@ int r_vbocount = 64;
// model animation smoothing cvar
int r_animsmoothing = 1;
static float fogresult, ofogresult, fogcol[4];
static float fogresult, fogcol[4];
// making this a macro should speed things up at the expense of code size
#define fogcalc(shade, vis, pal) \
@ -2159,13 +2159,11 @@ void drawpoly(double *dpx, double *dpy, int n, int method)
{
fullbrightdrawingpass = 2;
shadeforfullbrightpass = globalshade; // save the current shade
bglFogf(GL_FOG_DENSITY,0.0f); // no fog
globalshade = -128; // fullbright
ofogresult = fogresult;
bglDisable(GL_FOG);
drawpoly(dpx, dpy, n_, method_); // draw them afterwards, then. :)
fogresult = ofogresult;
bglEnable(GL_FOG);
globalshade = shadeforfullbrightpass;
bglFogf(GL_FOG_DENSITY, fogresult);
fullbrightdrawingpass = 0;
}
return;