Add MSF_DIRECTIONLIGHTING, forces directional lighting on, even indoors

UDMF flag: forcedirectionallighting
This commit is contained in:
James R 2023-08-11 01:42:48 -07:00
parent 70294e62bd
commit e0562a44e5
3 changed files with 11 additions and 0 deletions

View file

@ -6040,6 +6040,7 @@ const char *const MSF_LIST[] = {
"RIPPLE_CEILING",
"INVERTENCORE",
"FLATLIGHTING",
"DIRECTIONLIGHTING",
NULL
};

View file

@ -1708,6 +1708,8 @@ static void ParseTextmapSectorParameter(UINT32 i, const char *param, const char
sectors[i].flags |= MSF_INVERTENCORE;
else if (fastcmp(param, "flatlighting") && fastcmp("true", val))
sectors[i].flags |= MSF_FLATLIGHTING;
else if (fastcmp(param, "forcedirectionallighting") && fastcmp("true", val))
sectors[i].flags |= MSF_DIRECTIONLIGHTING;
else if (fastcmp(param, "nostepup") && fastcmp("true", val))
sectors[i].specialflags |= SSF_NOSTEPUP;
else if (fastcmp(param, "doublestepup") && fastcmp("true", val))
@ -3485,6 +3487,12 @@ void P_UpdateSegLightOffset(seg_t *li)
boolean P_SectorUsesDirectionalLighting(const sector_t *sector)
{
// explicitly turned on
if (sector->flags & MSF_DIRECTIONLIGHTING)
{
return true;
}
// explicitly turned off
if (sector->flags & MSF_FLATLIGHTING)
{

View file

@ -352,6 +352,8 @@ typedef enum
MSF_INVERTENCORE = 1<<12,
// turn off directional lighting
MSF_FLATLIGHTING = 1<<13,
// force it on (even if it was disabled)
MSF_DIRECTIONLIGHTING = 1<<14,
} sectorflags_t;
typedef enum