MiniQuake2

src/miniquake2/game/integration/pusher.ml

Provides miniquake2 game integration pusher facilities for this project.

Package
miniquake2.game.integration.pusher
Reachable
Yes

Imports

Declarations

addPlayerDeltaYaw

function addPlayerDeltaYaw(body, amount)

Add player delta yaw.

ParameterTypeDefaultDescription
bodydynamic—body value consumed by this operation.
amountdynamic—amount value consumed by this operation.

View source

advanceTeam

function advanceTeam(captureState, masterNumber, duration)

Integrate one pusher team for the frame before its atomic SV_Push pass.

ParameterTypeDefaultDescription
captureStatedynamic—captureState value consumed by this operation.
masterNumberdynamic—masterNumber value consumed by this operation.
durationdynamic—duration value consumed by this operation.

View source

assembleTeams

function assembleTeams(world)

Assemble teams.

ParameterTypeDefaultDescription
worlddynamic—world value consumed by this operation.

View source

bodyBoundsAt

function bodyBoundsAt(body, origin, angles)

Return the body bounds for the requested position.

ParameterTypeDefaultDescription
bodydynamic—body value consumed by this operation.
origindynamic—origin value consumed by this operation.
anglesdynamic—angles value consumed by this operation.

View source

bodyCanBePushed

function bodyCanBePushed(body)

Report whether body can be pushed.

ParameterTypeDefaultDescription
bodydynamic—body value consumed by this operation.

View source

bodyGroundNumber

function bodyGroundNumber(groundEntity)

Return the body ground number.

ParameterTypeDefaultDescription
groundEntitydynamic—groundEntity value consumed by this operation.

View source

bodyIntersectsFinalPusher

function bodyIntersectsFinalPusher(runtime, body)

Return the body intersects final pusher value.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
bodydynamic—body value consumed by this operation.

View source

bodyMoved

function bodyMoved(body)

Report whether body moved.

ParameterTypeDefaultDescription
bodydynamic—body value consumed by this operation.

View source

bodyPassEntity

function bodyPassEntity(runtime, body)

Return the body pass entity value.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
bodydynamic—body value consumed by this operation.

View source

bodyPositionBlocked

function bodyPositionBlocked(runtime, body, position)

Report whether body position blocked.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
bodydynamic—body value consumed by this operation.
positiondynamic—position value consumed by this operation.

View source

miniquake2.game.integration.pusher.BodySnapshot struct

bodySnapshotInto

function bodySnapshotInto(snapshot, kind, value, edict, number, origin, angles, mins, maxs, solid, groundNumber, clipMask, deltaYaw)

Populate the body snapshot destination.

ParameterTypeDefaultDescription
snapshotdynamic—snapshot value consumed by this operation.
kinddynamic—kind value consumed by this operation.
valuedynamic—Value consumed or transformed by the operation.
edictdynamic—edict value consumed by this operation.
numberdynamic—number value consumed by this operation.
origindynamic—origin value consumed by this operation.
anglesdynamic—angles value consumed by this operation.
minsdynamic—mins value consumed by this operation.
maxsdynamic—maxs value consumed by this operation.
soliddynamic—Identifier of sol.
groundNumberdynamic—groundNumber value consumed by this operation.
clipMaskdynamic—clipMask value consumed by this operation.
deltaYawdynamic—deltaYaw value consumed by this operation.

View source

capture

function capture(runtime)

Capture state.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.

View source

carryOrigin

function carryOrigin(body, pusherSnapshot)

Return the carry origin.

ParameterTypeDefaultDescription
bodydynamic—body value consumed by this operation.
pusherSnapshotdynamic—pusherSnapshot value consumed by this operation.

View source

clearGroundUnlessRiding

function clearGroundUnlessRiding(body, pusherSnapshot)

Clear ground unless riding.

ParameterTypeDefaultDescription
bodydynamic—body value consumed by this operation.
pusherSnapshotdynamic—pusherSnapshot value consumed by this operation.

View source

currentAngles

function currentAngles(body)

Return the current angles.

ParameterTypeDefaultDescription
bodydynamic—body value consumed by this operation.

View source

currentOrigin

function currentOrigin(body)

Return the current origin.

ParameterTypeDefaultDescription
bodydynamic—body value consumed by this operation.

View source

deferDueThinks

function deferDueThinks(captureState, targetTime)

Defer due mover thinks until the enclosing SV_Push transaction succeeds.

ParameterTypeDefaultDescription
captureStatedynamic—captureState value consumed by this operation.
targetTimedynamic—targetTime value consumed by this operation.

View source

finishTeamThinks

function finishTeamThinks(runtime, team, blocked)

Finish a pusher team's deferred thinks with g_phys.c ordering.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
teamdynamic—team value consumed by this operation.
blockeddynamic—blocked value consumed by this operation.

View source

isPusher

function isPusher(entity)

Report whether is pusher.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.

View source

itemBodyInto

function itemBodyInto(snapshot, item)

Populate a dropped/static MOVETYPE_TOSS item body destination.

ParameterTypeDefaultDescription
snapshotdynamic—snapshot value consumed by this operation.
itemdynamic—item value consumed by this operation.

View source

linkBody

function linkBody(runtime, body)

Link body.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
bodydynamic—body value consumed by this operation.

View source

monsterBodyInto

function monsterBodyInto(snapshot, actor)

Populate the monster body destination.

ParameterTypeDefaultDescription
snapshotdynamic—snapshot value consumed by this operation.
actordynamic—actor value consumed by this operation.

View source

moved

function moved(snapshot)

Report whether moved.

ParameterTypeDefaultDescription
snapshotdynamic—snapshot value consumed by this operation.

View source

playerBodyInto

function playerBodyInto(snapshot, player)

Populate the player body destination.

ParameterTypeDefaultDescription
snapshotdynamic—snapshot value consumed by this operation.
playerdynamic—player value consumed by this operation.

View source

playerDeltaYaw

function playerDeltaYaw(edict)

Return the player delta yaw.

ParameterTypeDefaultDescription
edictdynamic—edict value consumed by this operation.

View source

projectileBodyInto

function projectileBodyInto(snapshot, runtime, projectile)

Populate a MOVETYPE_FLYMISSILE/BOUNCE projectile body destination.

ParameterTypeDefaultDescription
snapshotdynamic—snapshot value consumed by this operation.
runtimedynamic—runtime value consumed by this operation.
projectiledynamic—projectile value consumed by this operation.

View source

proxyFor

function proxyFor(body)

Return the proxy for the requested input.

ParameterTypeDefaultDescription
bodydynamic—body value consumed by this operation.

View source

publishPusherMove

function publishPusherMove(runtime, snapshot)

Publish pusher move.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
snapshotdynamic—snapshot value consumed by this operation.

View source

pushBody

function pushBody(runtime, body, pusherSnapshot)

BaseQ2 SV_Push first moves a contacted bbox with a MOVETYPE_PUSH brush and reports a block only when the carried position is obstructed. Treating the first overlap as a block leaves the player embedded at the reversal point; the door then toggles direction and applies crush damage every server frame.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
bodydynamic—body value consumed by this operation.
pusherSnapshotdynamic—pusherSnapshot value consumed by this operation.

View source

pushCopy

function pushCopy(value)

Copy push data.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

pushCopyInto

inline function pushCopyInto(output, value)

Populate the push copy destination.

ParameterTypeDefaultDescription
outputdynamic—Output collection or buffer populated by the operation.
valuedynamic—Value consumed or transformed by the operation.

View source

pusherCanContactBodies

function pusherCanContactBodies(entity)

Report whether this mover has a linked brush volume that can contact bodies.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.

View source

miniquake2.game.integration.pusher.PusherCapture struct

pusherMasterNumber

function pusherMasterNumber(entity)

Return the pusher master number.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.

View source

miniquake2.game.integration.pusher.PusherSnapshot struct

pusherSnapshotInto

function pusherSnapshotInto(snapshot, entity)

Populate the pusher snapshot destination.

ParameterTypeDefaultDescription
snapshotdynamic—snapshot value consumed by this operation.
entitydynamic—entity value consumed by this operation.

View source

resolve

function resolve(runtime, captureState)

Resolve state.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
captureStatedynamic—captureState value consumed by this operation.

View source

resolveTeam

function resolveTeam(runtime, captureState, masterNumber)

Resolve team.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
captureStatedynamic—captureState value consumed by this operation.
masterNumberdynamic—masterNumber value consumed by this operation.

View source

restorePlayerDeltaYaw

function restorePlayerDeltaYaw(body)

Restore player delta yaw.

ParameterTypeDefaultDescription
bodydynamic—body value consumed by this operation.

View source

rotatedBounds

function rotatedBounds(origin, angles, mins, maxs)

Return the rotated bounds.

ParameterTypeDefaultDescription
origindynamic—origin value consumed by this operation.
anglesdynamic—angles value consumed by this operation.
minsdynamic—mins value consumed by this operation.
maxsdynamic—maxs value consumed by this operation.

View source

setBody

function setBody(body, origin, angles)

Set body.

ParameterTypeDefaultDescription
bodydynamic—body value consumed by this operation.
origindynamic—origin value consumed by this operation.
anglesdynamic—angles value consumed by this operation.

View source

snappedPusherMove

inline function snappedPusherMove(value)

Move snapped pusher.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

standingOn

function standingOn(body, pusherSnapshot)

Report whether standing on.

ParameterTypeDefaultDescription
bodydynamic—body value consumed by this operation.
pusherSnapshotdynamic—pusherSnapshot value consumed by this operation.

View source

strictOverlap

function strictOverlap(first, second)

Return the strict overlap value.

ParameterTypeDefaultDescription
firstdynamic—first value consumed by this operation.
seconddynamic—second value consumed by this operation.

View source

teamHas

function teamHas(team, number)

Report whether team has.

ParameterTypeDefaultDescription
teamdynamic—team value consumed by this operation.
numberdynamic—number value consumed by this operation.

View source

touchCommittedBodies

function touchCommittedBodies(runtime, bodies, movedBodies)

Run trigger passes only after the complete pusher team commits. g_phys.c defers G_TouchTriggers until SV_Push succeeds, so a rolled-back rider must never activate a trigger at its temporary carried position.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
bodiesdynamic—bodies value consumed by this operation.
movedBodiesdynamic—movedBodies value consumed by this operation.

View source

touchPushedEntries

function touchPushedEntries(runtime, entries)

Dispatch one stock SV_Push trigger pass. The shared pushed stack is walked in reverse after every successful team part; later team failure rolls back transforms but deliberately cannot roll back trigger side effects.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
entriesdynamic—entries value consumed by this operation.

View source

translatedFallback

function translatedFallback(destination, pusherSnapshot)

Return the translated fallback value.

ParameterTypeDefaultDescription
destinationdynamic—destination value consumed by this operation.
pusherSnapshotdynamic—pusherSnapshot value consumed by this operation.

View source

worldBodyCanBePushed

function worldBodyCanBePushed(entity)

g_phys.c excludes MOVETYPE_NONE/PUSH/STOP/NOCLIP entities before testing a pusher overlap. Managed world bodies that can actually be displaced use one of these three locomotion modes; static bbox/BSP helpers must never jam a door merely because their authored bounds intersect its swept volume.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.

View source

worldBodyInto

function worldBodyInto(snapshot, entity)

Populate the world body destination.

ParameterTypeDefaultDescription
snapshotdynamic—snapshot value consumed by this operation.
entitydynamic—entity value consumed by this operation.

View source