mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
Redo lighting for each wall sprite
- Because previously it just reused whatever the most recently drawn wall used.
This commit is contained in:
parent
e1ee80661e
commit
0aa67c68ab
1 changed files with 4 additions and 1 deletions
|
@ -409,7 +409,6 @@ void R_DrawWallSprite(vissprite_t *spr)
|
|||
{
|
||||
int x1, x2;
|
||||
fixed_t yscale;
|
||||
int shade = LIGHT2SHADE(140);
|
||||
|
||||
x1 = MAX<int>(spr->x1, spr->wallc.sx1);
|
||||
x2 = MIN<int>(spr->x2, spr->wallc.sx2 + 1);
|
||||
|
@ -440,6 +439,10 @@ void R_DrawWallSprite(vissprite_t *spr)
|
|||
rereadcolormap = false;
|
||||
}
|
||||
|
||||
int shade = LIGHT2SHADE(spr->sector->lightlevel + r_actualextralight);
|
||||
GlobVis = r_WallVisibility;
|
||||
rw_lightleft = SafeDivScale12(GlobVis, spr->wallc.sz1);
|
||||
rw_lightstep = (SafeDivScale12(GlobVis, spr->wallc.sz2) - rw_lightleft) / (spr->wallc.sx2 - spr->wallc.sx1);
|
||||
rw_light = rw_lightleft + (x1 - spr->wallc.sx1) * rw_lightstep;
|
||||
if (fixedlightlev >= 0)
|
||||
dc_colormap = usecolormap->Maps + fixedlightlev;
|
||||
|
|
Loading…
Reference in a new issue