diff --git a/extras/conf/udb/Includes/SRB222_linedefs.cfg b/extras/conf/udb/Includes/SRB222_linedefs.cfg index 430645decd85a8e88637d7201fff1aef76ad3b2a..324660d592d3c90970783a308ef1783be0978f62 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 c93a7ac2f2fd15d550488cf6ac2b38c5034035cd..30684702820a1687d4294cf9fb0074b325db0197 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 250aa4eef668e2179ebd231bf6586606dc1003f1..7ec7ca38cc479ae88d5a2797e4a532a550f437fb 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