MiniQuake2

src/miniquake2/client/prediction.ml

Provides miniquake2 client prediction facilities for this project.

Package
miniquake2.client.prediction
Reachable
Yes

Imports

Declarations

commandViewAngles

function commandViewAngles(playerState, command)

The PMF_NO_PREDICTION branch still updates view angles from the current command; only origin replay is disabled. This is the managed equivalent of cl.viewangles + SHORT2ANGLE(delta_angles) in CL_PredictMovement.

ParameterTypeDefaultDescription
playerStatedynamic—playerState value consumed by this operation.
commanddynamic—command value consumed by this operation.

View source

copyPmoveStateInto

function copyPmoveStateInto(output, input)

Populate the copy pmove state destination.

ParameterTypeDefaultDescription
outputdynamic—Output collection or buffer populated by the operation.
inputdynamic—input value consumed by this operation.

View source

copyUserCmdInto

function copyUserCmdInto(output, input)

Populate the copy user cmd destination.

ParameterTypeDefaultDescription
outputdynamic—Output collection or buffer populated by the operation.
inputdynamic—input value consumed by this operation.

View source

createWorkspace

function createWorkspace(traceCallback, pointContentsCallback)

Create workspace.

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

View source

localInputAngles

function localInputAngles(playerState)

cl.viewangles contains the command-space angles; pmove.delta_angles rotates them into the server-selected spawn/intermission space.

ParameterTypeDefaultDescription
playerStatedynamic—playerState value consumed by this operation.

View source

miniquake2.client.prediction.MovementPrediction struct

predict

function predict(playerState, commands, traceCallback, pointContentsCallback, airAcceleration)

Return the predict value.

ParameterTypeDefaultDescription
playerStatedynamic—playerState value consumed by this operation.
commandsdynamic—commands value consumed by this operation.
traceCallbackdynamic—traceCallback value consumed by this operation.
pointContentsCallbackdynamic—pointContentsCallback value consumed by this operation.
airAccelerationdynamic—airAcceleration value consumed by this operation.

View source

predictInto

function predictInto(workspace, playerState, commands, commandCount, airAcceleration)

Populate the predict destination.

ParameterTypeDefaultDescription
workspacedynamic—workspace value consumed by this operation.
playerStatedynamic—playerState value consumed by this operation.
commandsdynamic—commands value consumed by this operation.
commandCountdynamic—Number of command to process.
airAccelerationdynamic—airAcceleration value consumed by this operation.

View source

predictionEnabled

function predictionEnabled(playerState)

Report whether prediction enabled.

ParameterTypeDefaultDescription
playerStatedynamic—playerState value consumed by this operation.

View source

miniquake2.client.prediction.PredictionWorkspace struct

shortToAngle

inline function shortToAngle(value)

Performs the shortToAngle operation for the miniquake2 client prediction module.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

signedShort

inline function signedShort(value)

Return the signed short value.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source