mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 04:11:18 +00:00
Merge branch 'opengl-fullbrightsprite-fix' into 'master'
OpenGL: Fix FF_FULLBRIGHT not working in sectors with multiple light levels See merge request STJr/SRB2!244
This commit is contained in:
commit
98addbafa7
1 changed files with 9 additions and 3 deletions
|
@ -4228,6 +4228,9 @@ static void HWR_SplitSprite(gr_vissprite_t *spr)
|
|||
i = 0;
|
||||
temp = FLOAT_TO_FIXED(realtop);
|
||||
|
||||
if (spr->mobj->frame & FF_FULLBRIGHT)
|
||||
lightlevel = 255;
|
||||
|
||||
#ifdef ESLOPE
|
||||
for (i = 1; i < sector->numlights; i++)
|
||||
{
|
||||
|
@ -4235,6 +4238,7 @@ static void HWR_SplitSprite(gr_vissprite_t *spr)
|
|||
: sector->lightlist[i].height;
|
||||
if (h <= temp)
|
||||
{
|
||||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||
lightlevel = *list[i-1].lightlevel;
|
||||
colormap = list[i-1].extra_colormap;
|
||||
break;
|
||||
|
@ -4242,6 +4246,7 @@ static void HWR_SplitSprite(gr_vissprite_t *spr)
|
|||
}
|
||||
#else
|
||||
i = R_GetPlaneLight(sector, temp, false);
|
||||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||
lightlevel = *list[i].lightlevel;
|
||||
colormap = list[i].extra_colormap;
|
||||
#endif
|
||||
|
@ -4257,6 +4262,7 @@ static void HWR_SplitSprite(gr_vissprite_t *spr)
|
|||
// even if we aren't changing colormap or lightlevel, we still need to continue drawing down the sprite
|
||||
if (!(list[i].flags & FF_NOSHADE) && (list[i].flags & FF_CUTSPRITES))
|
||||
{
|
||||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||
lightlevel = *list[i].lightlevel;
|
||||
colormap = list[i].extra_colormap;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue