From 16f520f2a1bb0fdec4cc103e5de73a5b784d68a3 Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 19 Aug 2006 01:28:59 +0000 Subject: [PATCH] Fix for HUD model shading oddities git-svn-id: https://svn.eduke32.com/eduke32@269 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/src/polymost.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/polymer/build/src/polymost.c b/polymer/build/src/polymost.c index ee37235c5..cbe4d57fe 100644 --- a/polymer/build/src/polymost.c +++ b/polymer/build/src/polymost.c @@ -4223,8 +4223,18 @@ void polymost_dorotatesprite (long sx, long sy, long z, short a, short picnum, } } +#if 0 + if(!nofog) + { + i = klabs(tspr.shade); + bglFogf(GL_FOG_DENSITY,gvisibility/(tspr.shade<0?(shadetable[i]-glnegshadeoffset)*glnegshadescale:1)*(tspr.shade<0?1:shadetable[i]*glshadescale)*((float)((unsigned char)(sector[tspr.sectnum].visibility<240?sector[tspr.sectnum].visibility+16:sector[tspr.sectnum].visibility-239)))); + } mddraw(&tspr); - +#else + if(!nofog) bglDisable(GL_FOG); + mddraw(&tspr); + if(!nofog) bglEnable(GL_FOG); +#endif viewingrange = oldviewingrange; gxyaspect = ogxyaspect; globalshade = ogshade;