Files
src/p_lights.ml
Implements sector fire-flicker, flash, strobe, glow, and tagged lighting effects as thinkers.
- Package
(global)- Reachable
- Yes
Imports
Declarations
# _P_AddThinkerIfPossible
inline function _P_AddThinkerIfPossible(th)
Registers a lighting thinker when the full thinker list API is present, allowing reduced test harnesses to omit it.
| Parameter | Type | Default | Description |
|---|
th | dynamic | — | Th value supplied to `_P_AddThinkerIfPossible`. |
View source
# _P_MakeThinker
inline function _P_MakeThinker(acp1)
Constructs an unlinked thinker node whose primary callback drives a sector lighting effect.
| Parameter | Type | Default | Description |
|---|
acp1 | dynamic | — | Acp1 value supplied to `_P_MakeThinker`. |
View source
# EV_LightTurnOn
function EV_LightTurnOn(line, bright)
Sets tagged sectors to an explicit brightness or, when zero is requested, their brightest neighboring level.
| Parameter | Type | Default | Description |
|---|
line | dynamic | — | Map line or text line affected by the operation. |
bright | dynamic | — | Bright value supplied to `EV_LightTurnOn`. |
View source
# EV_StartLightStrobing
function EV_StartLightStrobing(line)
Adds unsynchronized slow strobe thinkers to every sector carrying the trigger line's tag.
| Parameter | Type | Default | Description |
|---|
line | dynamic | — | Map line or text line affected by the operation. |
View source
# EV_TurnTagLightsOff
function EV_TurnTagLightsOff(line)
Sets every tagged sector to the darkest light level found in its neighboring sectors.
| Parameter | Type | Default | Description |
|---|
line | dynamic | — | Map line or text line affected by the operation. |
View source
# P_SpawnFireFlicker
function P_SpawnFireFlicker(sector)
Attaches a fire-flicker thinker using the sector's current light as maximum and its darkest neighbor as minimum.
| Parameter | Type | Default | Description |
|---|
sector | dynamic | — | Map sector affected by the operation. |
View source
# P_SpawnGlowingLight
function P_SpawnGlowingLight(sector)
Attaches a glow thinker that begins dimming from the sector's current light toward its darkest neighbor.
| Parameter | Type | Default | Description |
|---|
sector | dynamic | — | Map sector affected by the operation. |
View source
# P_SpawnLightFlash
function P_SpawnLightFlash(sector)
Attaches a randomized two-level flash thinker bounded by the sector's original and darkest neighboring light.
| Parameter | Type | Default | Description |
|---|
sector | dynamic | — | Map sector affected by the operation. |
View source
# P_SpawnStrobeFlash
function P_SpawnStrobeFlash(sector, fastOrSlow, inSync)
Attaches a fast or slow strobe thinker, optionally synchronizing its initial countdown with peer sectors.
| Parameter | Type | Default | Description |
|---|
sector | dynamic | — | Map sector affected by the operation. |
fastOrSlow | dynamic | — | Fast or slow value supplied to `P_SpawnStrobeFlash`. |
inSync | dynamic | — | In sync value supplied to `P_SpawnStrobeFlash`. |
View source
# T_FireFlicker
function T_FireFlicker(flick)
Every four tics chooses a randomized fire brightness no darker than the sector's neighboring minimum.
| Parameter | Type | Default | Description |
|---|
flick | dynamic | — | Flick value supplied to `T_FireFlicker`. |
View source
# T_Glow
function T_Glow(g)
Smoothly oscillates a sector's light level between neighboring minimum and maximum bounds.
| Parameter | Type | Default | Description |
|---|
g | dynamic | — | G value supplied to `T_Glow`. |
View source
# T_LightFlash
function T_LightFlash(flash)
Alternates a sector between its bright and dark levels using randomized flash durations.
| Parameter | Type | Default | Description |
|---|
flash | dynamic | — | Flash value supplied to `T_LightFlash`. |
View source
# T_StrobeFlash
function T_StrobeFlash(flash)
Advances a sector strobe between minimum and maximum light levels with independent bright and dark intervals.
| Parameter | Type | Default | Description |
|---|
flash | dynamic | — | Flash value supplied to `T_StrobeFlash`. |
View source