diff --git a/extras/conf/udb/Includes/SRB222_linedefs.cfg b/extras/conf/udb/Includes/SRB222_linedefs.cfg index 430645dec..324660d59 100644 --- a/extras/conf/udb/Includes/SRB222_linedefs.cfg +++ b/extras/conf/udb/Includes/SRB222_linedefs.cfg @@ -3371,6 +3371,23 @@ udmf light { + 600 + { + title = "Copy Light Level to Tagged Sector's Planes"; + prefix = "(600)"; + arg0 + { + title = "Target sector tag"; + type = 13; + } + arg1 + { + title = "Affected planes"; + type = 11; + enum = "floorceiling"; + } + } + 602 { title = "Start Adjustable Pulsating Light"; diff --git a/src/p_setup.c b/src/p_setup.c index c93a7ac2f..306847028 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -4035,6 +4035,12 @@ static void P_ConvertBinaryMap(void) lines[i].args[4] |= TMPF_NONEXCLUSIVE; lines[i].special = 541; break; + case 600: //Floor lighting + case 601: //Ceiling lighting + lines[i].args[0] = tag; + lines[i].args[1] = (lines[i].special == 601) ? TMP_CEILING : TMP_FLOOR; + lines[i].special = 600; + break; case 606: //Colormap lines[i].args[0] = Tag_FGet(&lines[i].tags); break; diff --git a/src/p_spec.c b/src/p_spec.c index 250aa4eef..7ec7ca38c 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -6859,16 +6859,15 @@ void P_SpawnSpecials(boolean fromnetsave) // 546 is used for downwards current // 547 is used for push/pull - case 600: // floor lighting independently (e.g. lava) + case 600: // Copy light level to tagged sector's planes sec = sides[*lines[i].sidenum].sector-sectors; - TAG_ITER_SECTORS(tag, s) - sectors[s].floorlightsec = (INT32)sec; - break; - - case 601: // ceiling lighting independently - sec = sides[*lines[i].sidenum].sector-sectors; - TAG_ITER_SECTORS(tag, s) - sectors[s].ceilinglightsec = (INT32)sec; + TAG_ITER_SECTORS(lines[i].args[0], s) + { + if (lines[i].args[1] != TMP_CEILING) + sectors[s].floorlightsec = (INT32)sec; + if (lines[i].args[1] != TMP_FLOOR) + sectors[s].ceilinglightsec = (INT32)sec; + } break; case 602: // Adjustable pulsating light