# _P_ANG5
const _P_ANG5 = 59652323Defines p ang5 for the p user subsystem.
src/p_user.mlApplies player commands to turning, thrust, view height, jumping, weapon use, and power timers.
d_event.ml → src/d_event.mld_player.ml → src/d_player.mldoomdef.ml → src/doomdef.mldoomstat.ml → src/doomstat.mlinfo.ml → src/info.mlp_local.ml → src/p_local.mlp_mobj.ml → src/p_mobj.mlp_pspr.ml → src/p_pspr.mlr_main.ml → src/r_main.mlconst _P_ANG5 = 59652323Defines p ang5 for the p user subsystem.
const _P_BOBANGLESTEP = 409Defines p bobanglestep for the p user subsystem.
inline function _P_FineIndexFromAngle(angle)Converts a Doom binary angle to a wrapped fine-angle table index.
| Parameter | Type | Default | Description |
|---|---|---|---|
angle | dynamic | — | Doom binary-angle measurement. |
function _PU_GetPower(player, pw)Resolves a power enum safely and returns the player's remaining counter, defaulting to zero for malformed state.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | Player state affected by the operation. |
pw | dynamic | — | Pw value supplied to `_PU_GetPower`. |
inline function _PU_HasWeapon(player, w)Resolves a weapon enum and reports ownership without indexing malformed player tables.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | Player state affected by the operation. |
w | dynamic | — | W value supplied to `_PU_HasWeapon`. |
function _PU_PowerIndex(pw)Validates a power-up identifier before indexing the player's power timer array.
| Parameter | Type | Default | Description |
|---|---|---|---|
pw | dynamic | — | Pw value supplied to `_PU_PowerIndex`. |
function _PU_SetPower(player, pw, value)Resolves a power enum safely and replaces its counter only when the player's power table can hold it.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | Player state affected by the operation. |
pw | dynamic | — | Pw value supplied to `_PU_SetPower`. |
value | dynamic | — | Value consumed by the operation. |
function _PU_WeaponIndex(w)Validates and clamps an arbitrary weapon identifier to the player weapon-array range.
| Parameter | Type | Default | Description |
|---|---|---|---|
w | dynamic | — | W value supplied to `_PU_WeaponIndex`. |
const INVERSECOLORMAP = 32Defines the Doom palette selection for inversecolormap.
const MAXBOB = 1048576Defines the maximum maxbob accepted by the p user subsystem.
ongroundTracks whether onground is active in the p user subsystem.
function P_CalcHeight(player)Derives weapon bob and eye height from horizontal momentum, stance, airborne state, and ceiling clearance.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | Player state affected by the operation. |
function P_DeathThink(player)Lowers the dead player's view, turns toward the attacker, and requests rebirth when use is pressed.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | Player state affected by the operation. |
function P_MovePlayer(player)Applies command turning and grounded forward/side thrust, then enters the run animation when movement is requested.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | Player state affected by the operation. |
function P_PlayerThink(player)Applies one tic command to player movement, view, weapon, use, power timers, and death or live-state transitions.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | Player state affected by the operation. |
function P_Thrust(player, angle, move)Projects a movement magnitude through fine-angle sine/cosine tables and adds it to player horizontal momentum.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | Player state affected by the operation. |
angle | dynamic | — | Doom binary-angle measurement. |
move | dynamic | — | Move value supplied to `P_Thrust`. |