Merge branch 'colon-parenthesis' into 'next'

Fix semibright/fulldark frame flags not working with 3D models

See merge request STJr/SRB2!1779
This commit is contained in:
sphere 2022-07-29 09:33:20 +00:00
commit f8d2297e07

View file

@ -1306,7 +1306,11 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
light = R_GetPlaneLight(sector, spr->mobj->z + spr->mobj->height, false); // Always use the light at the top instead of whatever I was doing before
if (!R_ThingIsFullBright(spr->mobj))
if (R_ThingIsFullDark(spr->mobj))
lightlevel = 0;
else if (R_ThingIsSemiBright(spr->mobj))
lightlevel = 128 + (*sector->lightlist[light].lightlevel>>1);
else if (!R_ThingIsFullBright(spr->mobj))
lightlevel = *sector->lightlist[light].lightlevel > 255 ? 255 : *sector->lightlist[light].lightlevel;
if (*sector->lightlist[light].extra_colormap)
@ -1314,7 +1318,11 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
}
else
{
if (!R_ThingIsFullBright(spr->mobj))
if (R_ThingIsFullDark(spr->mobj))
lightlevel = 0;
else if (R_ThingIsSemiBright(spr->mobj))
lightlevel = 128 + (sector->lightlevel>>1);
else if (!R_ThingIsFullBright(spr->mobj))
lightlevel = sector->lightlevel > 255 ? 255 : sector->lightlevel;
if (sector->extra_colormap)