mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-16 01:11:28 +00:00
Fix r_usenewshading 3 visibility/fog for shades >= Numshades-1 (usually 31).
BUILD_LUNATIC. git-svn-id: https://svn.eduke32.com/eduke32@4452 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
b4a050b0cf
commit
8d9282bc24
1 changed files with 10 additions and 2 deletions
|
@ -560,8 +560,16 @@ static inline void fogcalc(int32_t tile, int32_t shade, int32_t vis, int32_t pal
|
|||
return;
|
||||
}
|
||||
|
||||
fogresult = (r_usenewshading == 3 && shade > 0) ? 0 : -(FOGDISTCONST * shade)/combvis;
|
||||
fogresult2 = (FOGDISTCONST * (numshades-1-shade))/combvis;
|
||||
if (r_usenewshading == 3 && shade >= numshades-1)
|
||||
{
|
||||
fogresult = -1;
|
||||
fogresult2 = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
fogresult = (r_usenewshading == 3 && shade > 0) ? 0 : -(FOGDISTCONST * shade)/combvis;
|
||||
fogresult2 = (FOGDISTCONST * (numshades-1-shade))/combvis;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue