MiniQuake2

src/miniquake2/physics/pmove.ml

Provides miniquake2 physics pmove facilities for this project.

Package
miniquake2.physics.pmove
Reachable
Yes

Imports

Declarations

accelerate

function accelerate(localState, wishDirection, wishSpeed, acceleration)

Return the accelerate value.

ParameterTypeDefaultDescription
localStatedynamic—localState value consumed by this operation.
wishDirectiondynamic—wishDirection value consumed by this operation.
wishSpeeddynamic—wishSpeed value consumed by this operation.
accelerationdynamic—acceleration value consumed by this operation.

View source

addCurrents

function addCurrents(pmove, localState, wishVelocity)

Add currents.

ParameterTypeDefaultDescription
pmovedynamic—pmove value consumed by this operation.
localStatedynamic—localState value consumed by this operation.
wishVelocitydynamic—wishVelocity value consumed by this operation.

View source

addTouch

function addTouch(pmove, entity)

Add touch.

ParameterTypeDefaultDescription
pmovedynamic—pmove value consumed by this operation.
entitydynamic—entity value consumed by this operation.

View source

airAccelerate

function airAccelerate(localState, wishDirection, wishSpeed, acceleration)

Return the air accelerate value.

ParameterTypeDefaultDescription
localStatedynamic—localState value consumed by this operation.
wishDirectiondynamic—wishDirection value consumed by this operation.
wishSpeeddynamic—wishSpeed value consumed by this operation.
accelerationdynamic—acceleration value consumed by this operation.

View source

airMove

function airMove(pmove, localState, airAcceleration)

Move air.

ParameterTypeDefaultDescription
pmovedynamic—pmove value consumed by this operation.
localStatedynamic—localState value consumed by this operation.
airAccelerationdynamic—airAcceleration value consumed by this operation.

View source

categorizePosition

function categorizePosition(pmove, localState)

Return the categorize position.

ParameterTypeDefaultDescription
pmovedynamic—pmove value consumed by this operation.
localStatedynamic—localState value consumed by this operation.

View source

checkDuck

function checkDuck(pmove, localState)

Validate duck.

ParameterTypeDefaultDescription
pmovedynamic—pmove value consumed by this operation.
localStatedynamic—localState value consumed by this operation.

View source

checkJump

function checkJump(pmove, localState)

Validate jump.

ParameterTypeDefaultDescription
pmovedynamic—pmove value consumed by this operation.
localStatedynamic—localState value consumed by this operation.

View source

checkSpecialMovement

function checkSpecialMovement(pmove, localState)

Validate special movement.

ParameterTypeDefaultDescription
pmovedynamic—pmove value consumed by this operation.
localStatedynamic—localState value consumed by this operation.

View source

clampAngles

function clampAngles(pmove, localState)

Clamp angles.

ParameterTypeDefaultDescription
pmovedynamic—pmove value consumed by this operation.
localStatedynamic—localState value consumed by this operation.

View source

clipVelocity

function clipVelocity(inputVelocity, normal, overbounce)

Clip velocity.

ParameterTypeDefaultDescription
inputVelocitydynamic—inputVelocity value consumed by this operation.
normaldynamic—normal value consumed by this operation.
overbouncedynamic—overbounce value consumed by this operation.

View source

create

function create(traceCallback, pointContentsCallback)

Creates create for the miniquake2 physics pmove module.

ParameterTypeDefaultDescription
traceCallbackdynamic—traceCallback value consumed by this operation.
pointContentsCallbackdynamic—pointContentsCallback value consumed by this operation.

View source

deadMove

function deadMove(pmove, localState)

Move dead.

ParameterTypeDefaultDescription
pmovedynamic—pmove value consumed by this operation.
localStatedynamic—localState value consumed by this operation.

View source

flyMove

function flyMove(pmove, localState, doClip)

Move fly.

ParameterTypeDefaultDescription
pmovedynamic—pmove value consumed by this operation.
localStatedynamic—localState value consumed by this operation.
doClipdynamic—doClip value consumed by this operation.

View source

friction

function friction(pmove, localState)

Return the friction value.

ParameterTypeDefaultDescription
pmovedynamic—pmove value consumed by this operation.
localStatedynamic—localState value consumed by this operation.

View source

goodPosition

function goodPosition(pmove)

Return the good position.

ParameterTypeDefaultDescription
pmovedynamic—pmove value consumed by this operation.

View source

initialSnapPosition

function initialSnapPosition(pmove, localState)

Return the initial snap position.

ParameterTypeDefaultDescription
pmovedynamic—pmove value consumed by this operation.
localStatedynamic—localState value consumed by this operation.

View source

move

function move(pmove)

Move state.

ParameterTypeDefaultDescription
pmovedynamic—pmove value consumed by this operation.

View source

moveWithAirAcceleration

function moveWithAirAcceleration(pmove, airAcceleration)

Move with air acceleration.

ParameterTypeDefaultDescription
pmovedynamic—pmove value consumed by this operation.
airAccelerationdynamic—airAcceleration value consumed by this operation.

View source

moveWithAirAccelerationUsingLocal

function moveWithAirAccelerationUsingLocal(pmove, airAcceleration, localState)

The caller-supplied private state makes high-frequency client prediction allocation-stable. Server/game callers retain the owning wrapper below.

ParameterTypeDefaultDescription
pmovedynamic—pmove value consumed by this operation.
airAccelerationdynamic—airAcceleration value consumed by this operation.
localStatedynamic—localState value consumed by this operation.

View source

shortToAngle

function shortToAngle(value)

Performs the shortToAngle operation for the miniquake2 physics pmove module.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

signedShort

function signedShort(value)

Return the signed short value.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

snapPosition

function snapPosition(pmove, localState)

Return the snap position.

ParameterTypeDefaultDescription
pmovedynamic—pmove value consumed by this operation.
localStatedynamic—localState value consumed by this operation.

View source

stepSlideMove

function stepSlideMove(pmove, localState)

Advance slide move.

ParameterTypeDefaultDescription
pmovedynamic—pmove value consumed by this operation.
localStatedynamic—localState value consumed by this operation.

View source

stepSlideMoveCore

function stepSlideMoveCore(pmove, localState)

Advance slide move core.

ParameterTypeDefaultDescription
pmovedynamic—pmove value consumed by this operation.
localStatedynamic—localState value consumed by this operation.

View source

waterMove

function waterMove(pmove, localState)

Move water.

ParameterTypeDefaultDescription
pmovedynamic—pmove value consumed by this operation.
localStatedynamic—localState value consumed by this operation.

View source