From e7d0c0abcb19065652e8f5416722c04a66850b5e Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sun, 30 Mar 2014 13:53:03 +0000 Subject: [PATCH] With r_usenewshade 3, do apply starting fog dist. eqn. for negative shade. git-svn-id: https://svn.eduke32.com/eduke32@4403 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/polymost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polymer/eduke32/build/src/polymost.c b/polymer/eduke32/build/src/polymost.c index feffde7f3..3070a972a 100644 --- a/polymer/eduke32/build/src/polymost.c +++ b/polymer/eduke32/build/src/polymost.c @@ -555,7 +555,7 @@ static inline void fogcalc(int32_t tile, int32_t shade, int32_t vis, int32_t pal return; } - fogresult = (r_usenewshading == 3) ? 0 : -(FOGDISTCONST * shade)/combvis; + fogresult = (r_usenewshading == 3 && shade > 0) ? 0 : -(FOGDISTCONST * shade)/combvis; fogresult2 = (FOGDISTCONST * (numshades-1-shade))/combvis; } }