Fix semibright/fulldark frame flags for models

This commit is contained in:
spherallic 2022-04-09 16:42:54 +02:00
parent d9799540c6
commit 5bdfb7ffc1

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)