From 4de01782d39486ffd5e7bb316b1aa9f7a653948f Mon Sep 17 00:00:00 2001 From: terminx Date: Tue, 21 Nov 2006 15:54:13 +0000 Subject: [PATCH] Hm, I think this actually works correctly now git-svn-id: https://svn.eduke32.com/eduke32@358 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/src/polymost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polymer/build/src/polymost.c b/polymer/build/src/polymost.c index 36411c1ab..c30b62076 100644 --- a/polymer/build/src/polymost.c +++ b/polymer/build/src/polymost.c @@ -155,7 +155,7 @@ float fogcalc(signed char shade, char vis) // return(gvisibility/(shade<0?(shadetable[i]-glnegshadeoffset)*glnegshadescale:1)*(shade<0?1:shadetable[i]*glshadescale)*((float)((unsigned char)(vis<240?vis+16:vis-239)))); - result = ((float)(vis<240?vis+16:0))+(shade>0?shade:(shade*2))/(vis>239?klabs(vis-256):1); + result = (float)((vis<240?vis+16:vis-240)+shade/(vis>239?(klabs(vis-256)):1)); if(result < 0.000) result = 0.000; // if(result > 1.000) result = 1.000;