# _InitItemRespawnQueue
inline function _InitItemRespawnQueue()Allocates the bounded dropped-item mapthing/timestamp ring on first respawn-queue use.
src/p_mobj.mlDefines actor state, spawn/removal ownership, missile and player creation, movement, and item respawn.
d_player.ml → src/d_player.mld_think.ml → src/d_think.mldoomdata.ml → src/doomdata.mldoomdef.ml → src/doomdef.mldoomstat.ml → src/doomstat.mlhu_stuff.ml → src/hu_stuff.mli_system.ml → src/i_system.mlinfo.ml → src/info.mlm_fixed.ml → src/m_fixed.mlm_random.ml → src/m_random.mlp_local.ml → src/p_local.mlp_map.ml → src/p_map.mlp_maputl.ml → src/p_maputl.mlp_pspr.ml → src/p_pspr.mlr_main.ml → src/r_main.mls_sound.ml → src/s_sound.mlsounds.ml → src/sounds.mlst_stuff.ml → src/st_stuff.mlstd/math.ml → ../MiniLangCompilerOptimization/MiniLangCompilerPy/std/math.ml external dependencytables.ml → src/tables.mlz_zone.ml → src/z_zone.mlinline function _InitItemRespawnQueue()Allocates the bounded dropped-item mapthing/timestamp ring on first respawn-queue use.
function _Mobj_Default()Constructs an unlinked inert actor whose fields satisfy mobj_t's runtime invariants.
inline function _PM_AllocNetUid()Allocates a positive per-mobj uid used by multiplayer replication.
function _PM_EnsurePlayerSlots()Extends player and in-game arrays to MAXPLAYERS before mapthing-driven spawn access.
inline function _PM_IDiv(a, b)Truncates actor movement quotients toward zero, returning zero for invalid operands.
| Parameter | Type | Default | Description |
|---|---|---|---|
a | dynamic | — | First input operand. |
b | dynamic | — | Second input operand. |
function _PM_MobjTypeIndex(v)Converts a checked mobj type enum/value to an in-range mobjinfo table index.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
_pm_next_netuidTracks the mutable pm next netuid value used by the p mobj subsystem.
_pm_next_thinker_idTracks the mutable pm next thinker id value used by the p mobj subsystem.
inline function _PM_RegisterThinker(node, owner)Records the stable thinker-node-to-mobj association used when callbacks receive only a node.
| Parameter | Type | Default | Description |
|---|---|---|---|
node | dynamic | — | Node value supplied to `_PM_RegisterThinker`. |
owner | dynamic | — | Owner value supplied to `_PM_RegisterThinker`. |
inline function _PM_ResolveThinkerId(node)Returns stable thinker registration id used for multiplayer actor mapping.
| Parameter | Type | Default | Description |
|---|---|---|---|
node | dynamic | — | Node value supplied to `_PM_ResolveThinkerId`. |
inline function _PM_ResolveThinkerOwner(node)Resolves either a direct mobj or its registered thinker node to the current actor owner.
| Parameter | Type | Default | Description |
|---|---|---|---|
node | dynamic | — | Node value supplied to `_PM_ResolveThinkerOwner`. |
inline function _PM_StateSpriteIndex(spr)Converts a state sprite enum/value to a valid sprite table index or the null sprite.
| Parameter | Type | Default | Description |
|---|---|---|---|
spr | dynamic | — | Spr value supplied to `_PM_StateSpriteIndex`. |
_pm_thinker_idsStores the pm thinker ids collection used by the p mobj subsystem.
_pm_thinker_nodesStores the pm thinker nodes collection used by the p mobj subsystem.
_pm_thinker_ownersStores the pm thinker owners collection used by the p mobj subsystem.
inline function _PM_ToInt(v, fallback)Normalizes enum/numeric actor fields to truncating integers with a supplied fallback.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
fallback | dynamic | — | Value returned when the requested conversion or lookup is unavailable. |
inline function _PM_UnregisterThinker(node)Removes a thinker-node ownership entry when its mobj leaves the world.
| Parameter | Type | Default | Description |
|---|---|---|---|
node | dynamic | — | Node value supplied to `_PM_UnregisterThinker`. |
const FRICTION = 59392Defines friction for the p mobj subsystem.
iqueheadTracks the mutable iquehead value used by the p mobj subsystem.
iquetailTracks the mutable iquetail value used by the p mobj subsystem.
const ITEMQUESIZE = 128Defines itemquesize for the p mobj subsystem.
itemrespawnqueStores the itemrespawnque collection used by the p mobj subsystem.
itemrespawntimeStores the itemrespawntime collection used by the p mobj subsystem.
mobj_t struct
mobjflag_t enum
function P_CheckMissileSpawn(th)Advances a new missile half a tic and explodes it immediately if its initial position is blocked.
| Parameter | Type | Default | Description |
|---|---|---|---|
th | dynamic | — | Th value supplied to `P_CheckMissileSpawn`. |
function P_ExplodeMissile(mo)Stops missile momentum, enters its death state, removes missile solidity, and plays its death cue.
| Parameter | Type | Default | Description |
|---|---|---|---|
mo | dynamic | — | Map object affected by the operation. |
function P_MobjThinker(mo)Advances one actor's movement/state timer and triggers nightmare respawn when eligible.
| Parameter | Type | Default | Description |
|---|---|---|---|
mo | dynamic | — | Map object affected by the operation. |
function P_NightmareRespawn(mobj)Recreates a killed monster at its original spawn point with teleport fog and reaction delay.
| Parameter | Type | Default | Description |
|---|---|---|---|
mobj | dynamic | — | Map object affected by the operation. |
function P_RemoveMobj(th)Queues eligible specials for respawn, unlinks the actor, and unregisters its thinker safely.
| Parameter | Type | Default | Description |
|---|---|---|---|
th | dynamic | — | Th value supplied to `P_RemoveMobj`. |
function P_RespawnSpecials()Respawns one queued pickup after its delay when the destination is unoccupied.
function P_SetMobjState(mobj, state)Enters a state, runs its action, and follows zero-tic transitions until a timed or null state.
| Parameter | Type | Default | Description |
|---|---|---|---|
mobj | dynamic | — | Map object affected by the operation. |
state | dynamic | — | Subsystem state read or updated by the operation. |
function P_SpawnBlood(x, y, z, damage)Spawns a randomized blood spray and selects its damage-scaled animation state.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
z | dynamic | — | Vertical world-space coordinate. |
damage | dynamic | — | Damage value supplied to `P_SpawnBlood`. |
function P_SpawnMapThing(mthing)Filters a mapthing by player/skill/type rules, then spawns its actor and map-derived flags.
| Parameter | Type | Default | Description |
|---|---|---|---|
mthing | dynamic | — | Mthing value supplied to `P_SpawnMapThing`. |
function P_SpawnMissile(source, dest, type)Aims a projectile from source to destination, sets owner/momentum, and validates its first step.
| Parameter | Type | Default | Description |
|---|---|---|---|
source | dynamic | — | Source value or buffer. |
dest | dynamic | — | Dest value supplied to `P_SpawnMissile`. |
type | dynamic | — | Type value supplied to `P_SpawnMissile`. |
function P_SpawnMobj(x, y, z, type)Instantiates an actor from mobjinfo, links it spatially, and registers its thinker ownership.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
z | dynamic | — | Vertical world-space coordinate. |
type | dynamic | — | Type value supplied to `P_SpawnMobj`. |
function P_SpawnPlayer(mthing)Converts a player start mapthing into a live pawn and attaches view, health, and reborn state.
| Parameter | Type | Default | Description |
|---|---|---|---|
mthing | dynamic | — | Mthing value supplied to `P_SpawnPlayer`. |
function P_SpawnPlayerMissile(source, type)Auto-aims a player projectile across fallback angles before spawning and validating it.
| Parameter | Type | Default | Description |
|---|---|---|---|
source | dynamic | — | Source value or buffer. |
type | dynamic | — | Type value supplied to `P_SpawnPlayerMissile`. |
function P_SpawnPuff(x, y, z)Spawns a randomized-height bullet puff and selects its melee-safe animation variant.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
z | dynamic | — | Vertical world-space coordinate. |
function P_XYMovement(mo)Applies bounded XY momentum through collision/slide logic, then friction for grounded actors.
| Parameter | Type | Default | Description |
|---|---|---|---|
mo | dynamic | — | Map object affected by the operation. |
function P_ZMovement(mo)Integrates vertical momentum, gravity, floor/ceiling impacts, bouncing skulls, and missile explosions.
| Parameter | Type | Default | Description |
|---|---|---|---|
mo | dynamic | — | Map object affected by the operation. |
const STOPSPEED = 4096Defines stopspeed for the p mobj subsystem.