# _LineIndex
function _LineIndex(ld)Resolves a line reference to its stable map-line index for validcount de-duplication.
| Parameter | Type | Default | Description |
|---|---|---|---|
ld | dynamic | — | Ld value supplied to `_LineIndex`. |
src/p_map.mlResolves mobj/line collision, movement and sliding, use traces, hitscan attacks, and sector crushing.
doomdef.ml → src/doomdef.mldoomstat.ml → src/doomstat.mli_system.ml → src/i_system.mlinfo.ml → src/info.mlm_argv.ml → src/m_argv.mlm_bbox.ml → src/m_bbox.mlm_fixed.ml → src/m_fixed.mlm_random.ml → src/m_random.mlp_inter.ml → src/p_inter.mlp_local.ml → src/p_local.mlp_maputl.ml → src/p_maputl.mlp_mobj.ml → src/p_mobj.mlp_sight.ml → src/p_sight.mlp_spec.ml → src/p_spec.mlp_switch.ml → src/p_switch.mlr_main.ml → src/r_main.mlr_sky.ml → src/r_sky.mlr_state.ml → src/r_state.mls_sound.ml → src/s_sound.mlsounds.ml → src/sounds.mltables.ml → src/tables.mlfunction _LineIndex(ld)Resolves a line reference to its stable map-line index for validcount de-duplication.
| Parameter | Type | Default | Description |
|---|---|---|---|
ld | dynamic | — | Ld value supplied to `_LineIndex`. |
inline function _MapAbs(x)Returns an integer magnitude for fixed-point distance and intercept comparisons.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
inline function _PM_DiagMovePrint(msg)Emits a try-move trace only when the cached diagnostic flag permits it.
| Parameter | Type | Default | Description |
|---|---|---|---|
msg | dynamic | — | Msg value supplied to `_PM_DiagMovePrint`. |
inline function _PM_TryMoveDiagEnabled()Caches whether command-line try-move diagnostics are enabled for this process.
inline function _PM_UseDiagEnabled()Caches whether command-line use-line traversal diagnostics are enabled.
inline function _PM_UseDiagLog(msg)Emits a use-line trace only under the explicit diagnostic flag.
| Parameter | Type | Default | Description |
|---|---|---|---|
msg | dynamic | — | Msg value supplied to `_PM_UseDiagLog`. |
inline function _PMAP_IDiv(a, b)Truncates fixed-point geometry quotients toward zero and maps invalid divisors to zero.
| Parameter | Type | Default | Description |
|---|---|---|---|
a | dynamic | — | First input operand. |
b | dynamic | — | Second input operand. |
inline function _PMAP_S32(v)Reinterprets an arithmetic result with signed 32-bit wrap semantics used by blockmap math.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
_pmDiagFailCountTracks the mutable pm diag fail count value used by the p map subsystem.
_pmDiagLineCandCurTracks the mutable pm diag line cand cur value used by the p map subsystem.
_pmDiagLineCandLastTracks the mutable pm diag line cand last value used by the p map subsystem.
_pmDiagLineChecksCurTracks the mutable pm diag line checks cur value used by the p map subsystem.
_pmDiagLineChecksLastTracks the mutable pm diag line checks last value used by the p map subsystem.
_pmDiagMoveTracks whether pm diag move is active in the p map subsystem.
_pmDiagMoveInitTracks whether pm diag move init is active in the p map subsystem.
_pmDiagPlayerFailTracks the mutable pm diag player fail value used by the p map subsystem.
_pmDiagPlayerTryTracks the mutable pm diag player try value used by the p map subsystem.
_pmDiagTryCountTracks the mutable pm diag try count value used by the p map subsystem.
_pmDiagUseTracks whether pm diag use is active in the p map subsystem.
_pmDiagUseCountTracks the mutable pm diag use count value used by the p map subsystem.
_pmDiagUseInitTracks whether pm diag use init is active in the p map subsystem.
inline function _SetTMBox(x, y, radius)Fills the shared candidate bounding box from a center and collision radius.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
radius | dynamic | — | Radius value supplied to `_SetTMBox`. |
aimslopeTracks the mutable aimslope value used by the p map subsystem.
attackrangeTracks the mutable attackrange value used by the p map subsystem.
bestslidefracTracks the mutable bestslidefrac value used by the p map subsystem.
bestslidelineHolds the optional bestslideline resource used by the p map subsystem.
bombdamageTracks the mutable bombdamage value used by the p map subsystem.
bombsourceHolds the optional bombsource resource used by the p map subsystem.
bombspotHolds the optional bombspot resource used by the p map subsystem.
bottomslopeTracks the mutable bottomslope value used by the p map subsystem.
crushchangeTracks whether crushchange is active in the p map subsystem.
la_damageTracks the mutable la damage value used by the p map subsystem.
const MAXSPECIALCROSS = 8Defines the maximum maxspecialcross accepted by the p map subsystem.
nofitTracks whether nofit is active in the p map subsystem.
numspechitTracks the mutable numspechit value used by the p map subsystem.
function P_AimLineAttack(t1, angle, distance)Computes line attack values for the map collision.
| Parameter | Type | Default | Description |
|---|---|---|---|
t1 | dynamic | — | T1 value supplied to `P_AimLineAttack`. |
angle | dynamic | — | Doom binary-angle measurement. |
distance | dynamic | — | Distance value supplied to `P_AimLineAttack`. |
function P_ChangeSector(sector, crunch)Visits all blockmap things touching a moving sector and reports whether any were crushed.
| Parameter | Type | Default | Description |
|---|---|---|---|
sector | dynamic | — | Map sector affected by the operation. |
crunch | dynamic | — | Crunch value supplied to `P_ChangeSector`. |
function P_CheckPosition(thing, x, y)Probes a candidate origin, populating shared opening globals without committing the mobj position.
| Parameter | Type | Default | Description |
|---|---|---|---|
thing | dynamic | — | World object affected by the operation. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
function P_HitSlideLine(ld)Projects the pending slide vector along the wall axis or clears it on horizontal/vertical walls.
| Parameter | Type | Default | Description |
|---|---|---|---|
ld | dynamic | — | Ld value supplied to `P_HitSlideLine`. |
function P_LineAttack(t1, angle, distance, slope, damage)Configures a hitscan ray and traverses intercepts to apply damage at the supplied slope.
| Parameter | Type | Default | Description |
|---|---|---|---|
t1 | dynamic | — | T1 value supplied to `P_LineAttack`. |
angle | dynamic | — | Doom binary-angle measurement. |
distance | dynamic | — | Distance value supplied to `P_LineAttack`. |
slope | dynamic | — | Slope value supplied to `P_LineAttack`. |
damage | dynamic | — | Damage value supplied to `P_LineAttack`. |
function P_RadiusAttack(spot, source, damage)Walks blast-radius blockmap cells and damages visible shootable occupants around an explosion.
| Parameter | Type | Default | Description |
|---|---|---|---|
spot | dynamic | — | Spot value supplied to `P_RadiusAttack`. |
source | dynamic | — | Source value or buffer. |
damage | dynamic | — | Damage value supplied to `P_RadiusAttack`. |
function P_SlideMove(mo)Traces leading corners, clips momentum at the nearest wall, and retries up to three slide bumps.
| Parameter | Type | Default | Description |
|---|---|---|---|
mo | dynamic | — | Map object affected by the operation. |
function P_TeleportMove(thing, x, y)Telefrags destination occupants and relocates the mobj without ordinary wall/step restrictions.
| Parameter | Type | Default | Description |
|---|---|---|---|
thing | dynamic | — | World object affected by the operation. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
function P_ThingHeightClip(thing)Recomputes floor/ceiling bounds after sector motion and clamps a grounded mobj to its new floor.
| Parameter | Type | Default | Description |
|---|---|---|---|
thing | dynamic | — | World object affected by the operation. |
function P_TryMove(thing, x, y)Validates step/dropoff/ceiling constraints and commits a legal XY move with sector relinking.
| Parameter | Type | Default | Description |
|---|---|---|---|
thing | dynamic | — | World object affected by the operation. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
function P_UseLines(player)Casts the player's short use ray and activates the first eligible crossed line.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | Player state affected by the operation. |
function PIT_ChangeSector(thing)Reclips one resident mobj after sector motion and applies crush damage when it no longer fits.
| Parameter | Type | Default | Description |
|---|---|---|---|
thing | dynamic | — | World object affected by the operation. |
function PIT_CheckLine(ld)Rejects blocking crossed lines and narrows candidate floor, ceiling, and dropoff openings.
| Parameter | Type | Default | Description |
|---|---|---|---|
ld | dynamic | — | Ld value supplied to `PIT_CheckLine`. |
function PIT_CheckThing(thing)Resolves mobj overlap as blocking, missile impact, skull charge, or player pickup contact.
| Parameter | Type | Default | Description |
|---|---|---|---|
thing | dynamic | — | World object affected by the operation. |
function PIT_RadiusAttack(thing)Applies distance-falloff splash damage to one shootable thing with line-of-sight to the blast.
| Parameter | Type | Default | Description |
|---|---|---|---|
thing | dynamic | — | World object affected by the operation. |
function PIT_StompThing(thing)Telefrags shootable occupants overlapping the teleport destination, excluding the mover itself.
| Parameter | Type | Default | Description |
|---|---|---|---|
thing | dynamic | — | World object affected by the operation. |
function PTR_AimTraverse(inter)Narrows the vertical aiming window through lines and locks onto the first shootable intercept.
| Parameter | Type | Default | Description |
|---|---|---|---|
inter | dynamic | — | Inter value supplied to `PTR_AimTraverse`. |
function PTR_ShootTraverse(inter)Activates shoot specials and spawns wall puffs or target blood at the first hitscan impact.
| Parameter | Type | Default | Description |
|---|---|---|---|
inter | dynamic | — | Inter value supplied to `PTR_ShootTraverse`. |
function PTR_SlideTraverse(inter)Records the nearest blocking line intercept for the current slide trace.
| Parameter | Type | Default | Description |
|---|---|---|---|
inter | dynamic | — | Inter value supplied to `PTR_SlideTraverse`. |
function PTR_UseTraverse(inter)Activates the first usable special line on a use trace or stops at a closed non-special line.
| Parameter | Type | Default | Description |
|---|---|---|---|
inter | dynamic | — | Inter value supplied to `PTR_UseTraverse`. |
secondslidefracTracks the mutable secondslidefrac value used by the p map subsystem.
secondslidelineHolds the optional secondslideline resource used by the p map subsystem.
shootthingHolds the optional shootthing resource used by the p map subsystem.
shootzTracks the mutable shootz value used by the p map subsystem.
slidemoHolds the optional slidemo resource used by the p map subsystem.
spechitStores the spechit collection used by the p map subsystem.
tmbboxStores the tmbbox collection used by the p map subsystem.
tmdropoffzTracks the mutable tmdropoffz value used by the p map subsystem.
tmflagsTracks the mutable tmflags value used by the p map subsystem.
tmthingHolds the optional tmthing resource used by the p map subsystem.
tmxTracks the mutable tmx value used by the p map subsystem.
tmxmoveTracks the mutable tmxmove value used by the p map subsystem.
tmyTracks the mutable tmy value used by the p map subsystem.
tmymoveTracks the mutable tmymove value used by the p map subsystem.
topslopeTracks the mutable topslope value used by the p map subsystem.
usethingHolds the optional usething resource used by the p map subsystem.