mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
Fix bug causing fog to be dull in some maps
This commit is contained in:
parent
c3c9025b27
commit
d5d8697efa
1 changed files with 4 additions and 2 deletions
|
|
@ -683,7 +683,7 @@ lighttable_t *R_CreateLightTable(extracolormap_t *extra_colormap)
|
||||||
// This code creates the colormap array used by software renderer
|
// This code creates the colormap array used by software renderer
|
||||||
/////////////////////
|
/////////////////////
|
||||||
{
|
{
|
||||||
double r, g, b, cbrightness, cbest;
|
double r, g, b, cbrightness, cbest, cdist;
|
||||||
int p;
|
int p;
|
||||||
lighttable_t *colormap_p;
|
lighttable_t *colormap_p;
|
||||||
|
|
||||||
|
|
@ -717,14 +717,16 @@ lighttable_t *R_CreateLightTable(extracolormap_t *extra_colormap)
|
||||||
if (cbrightness < cdestbright)
|
if (cbrightness < cdestbright)
|
||||||
{
|
{
|
||||||
cbest = 255.0l - min(r, min(g, b));
|
cbest = 255.0l - min(r, min(g, b));
|
||||||
|
cdist = 255.0l - cdestbright;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cbest = max(r, max(g, b));
|
cbest = max(r, max(g, b));
|
||||||
|
cdist = cdestbright;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add/subtract this value during fading.
|
// Add/subtract this value during fading.
|
||||||
brightChange[i] = abs(cbest - cdestbright) / (double)fadedist;
|
brightChange[i] = abs(cbest - cdist) / (double)fadedist;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now allocate memory for the actual colormap array itself!
|
// Now allocate memory for the actual colormap array itself!
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue