diff --git a/src/deh_tables.c b/src/deh_tables.c index 6344d3ceb..5b2b81153 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -5688,6 +5688,7 @@ const char *const MSF_LIST[] = { "RIPPLE_CEILING", "INVERTENCORE", "FLATLIGHTING", + "DIRECTIONLIGHTING", NULL }; diff --git a/src/p_setup.c b/src/p_setup.c index 2ebc3a6d7..5e3f5a54b 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -1714,6 +1714,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)) @@ -3369,6 +3371,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) { diff --git a/src/r_defs.h b/src/r_defs.h index 82f98bfa7..cf8801f75 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -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