diff --git a/polymer/build/src/defs.c b/polymer/build/src/defs.c index d0f2d95ab..0a65eeb2a 100644 --- a/polymer/build/src/defs.c +++ b/polymer/build/src/defs.c @@ -1148,7 +1148,7 @@ static int defsparser(scriptfile *script) } break; case T_DETAIL: case T_GLOW: { char *detailtokptr = script->ltextptr, *detailend; - int pal, i; + int pal = 0, i; char *fn = NULL; double param = 1.0; char flags = 0; diff --git a/polymer/build/src/mdsprite.c b/polymer/build/src/mdsprite.c index 787514e8a..2a2325949 100644 --- a/polymer/build/src/mdsprite.c +++ b/polymer/build/src/mdsprite.c @@ -1506,7 +1506,7 @@ if (tspr->cstat&2) { if (!(tspr->cstat&512)) pc[3] = 0.66; else pc[3] = 0.33; } //i = mdloadskin((md2model *)m,tile2model[tspr->picnum].skinnum,surfi); //hack for testing multiple surfaces per MD3 bglBindTexture(GL_TEXTURE_2D, i); - if (r_detailmapping && !r_depthpeeling && indrawroomsandmasks&& !(tspr->cstat&1024)) + if (r_detailmapping && !r_depthpeeling && !(tspr->cstat&1024)) i = mdloadskin((md2model *)m,tile2model[tspr->picnum].skinnum,DETAILPAL,surfi); else i = 0; @@ -1546,7 +1546,7 @@ if (tspr->cstat&2) { if (!(tspr->cstat&512)) pc[3] = 0.66; else pc[3] = 0.33; } bglMatrixMode(GL_MODELVIEW); } - if (r_glowmapping && !r_depthpeeling && indrawroomsandmasks && !(tspr->cstat&1024)) + if (r_glowmapping && !r_depthpeeling && !(tspr->cstat&1024)) i = mdloadskin((md2model *)m,tile2model[tspr->picnum].skinnum,GLOWPAL,surfi); else i = 0; diff --git a/polymer/build/src/polymer.c b/polymer/build/src/polymer.c index 2c752b6da..259ca5553 100644 --- a/polymer/build/src/polymer.c +++ b/polymer/build/src/polymer.c @@ -102,7 +102,7 @@ void polymer_glinit(void) bglDisable(GL_FOG); - bglFogi(GL_FOG_MODE, GL_EXP); + bglFogi(GL_FOG_MODE, GL_EXP2); //glFogfv(GL_FOG_COLOR, fogColor); bglEnable(GL_FOG); diff --git a/polymer/build/src/polymost.c b/polymer/build/src/polymost.c index cb08f5691..809c9ba57 100644 --- a/polymer/build/src/polymost.c +++ b/polymer/build/src/polymost.c @@ -691,7 +691,7 @@ void polymost_glinit() bglHint(GL_FOG_HINT,GL_DONT_CARE); #endif - bglFogi(GL_FOG_MODE,GL_EXP); + bglFogi(GL_FOG_MODE,GL_EXP2); bglFogf(GL_FOG_DENSITY,1.0); //must be > 0, default is 1 /* bglFogf(GL_FOG_START,0.0); //default is 0 bglFogf(GL_FOG_END,1.0); //default is 1 */ @@ -1650,7 +1650,7 @@ void drawpoly (double *dpx, double *dpy, long n, long method) bglBindTexture(GL_TEXTURE_2D, pth ? pth->glpic : 0); detailpth = NULL; - if (r_detailmapping && usehightile && !r_depthpeeling && indrawroomsandmasks && !drawingskybox && + if (r_detailmapping && usehightile && !r_depthpeeling && !drawingskybox && hicfindsubst(globalpicnum, DETAILPAL, 0)) detailpth = gltexcache(globalpicnum, DETAILPAL, method&(~3)); @@ -1691,7 +1691,7 @@ void drawpoly (double *dpx, double *dpy, long n, long method) detailpth = NULL; glowpth = NULL; - if (r_glowmapping && usehightile && !r_depthpeeling && indrawroomsandmasks && !drawingskybox && + if (r_glowmapping && usehightile && !r_depthpeeling && !drawingskybox && hicfindsubst(globalpicnum, GLOWPAL, 0)) glowpth = gltexcache(globalpicnum, GLOWPAL, method&(~3));