MiniQuake2

src/miniquake2/client/prediction_world.ml

Provides miniquake2 client prediction world facilities for this project.

Package
miniquake2.client.prediction_world
Reachable
Yes

Imports

Declarations

activePredictionWorld

activePredictionWorld

Stores module-wide active prediction world state for the miniquake2 client prediction world module.

View source

BOX_EPSILON

const BOX_EPSILON = 3.125e-002

Defines the box epsilon constant used by the miniquake2 client prediction world module.

View source

boxEntityTrace

function boxEntityTrace(start, mins, maxs, finish, entity)

CM_HeadnodeForBox + CM_TransformedBoxTrace, expressed directly as a swept point against the Minkowski-expanded encoded entity bounds. Keep the three slab axes scalar: Pmove calls this for every solid entity and temporary arrays/structs here measurably dominate remote-client prediction.

ParameterTypeDefaultDescription
startdynamic—start value consumed by this operation.
minsdynamic—mins value consumed by this operation.
maxsdynamic—maxs value consumed by this operation.
finishdynamic—finish value consumed by this operation.
entitydynamic—entity value consumed by this operation.

View source

collisionTrace

function collisionTrace(result, entity)

Trace collision.

ParameterTypeDefaultDescription
resultdynamic—Result object populated or inspected by the operation.
entitydynamic—entity value consumed by this operation.

View source

createPredictionWorkspace

function createPredictionWorkspace()

Create prediction workspace.

View source

createWorld

function createWorld()

Create world.

View source

dot

inline function dot(first, second)

Performs the dot operation for the miniquake2 client prediction world module.

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

View source

emptyTrace

function emptyTrace(finish)

Report whether empty trace.

ParameterTypeDefaultDescription
finishdynamic—finish value consumed by this operation.

View source

inlineModelNumber

function inlineModelNumber(world, modelIndex)

Return the inline model number.

ParameterTypeDefaultDescription
worlddynamic—world value consumed by this operation.
modelIndexdynamic—Zero-based index of model.

View source

mergeTrace

function mergeTrace(best, candidate)

Merge trace.

ParameterTypeDefaultDescription
bestdynamic—best value consumed by this operation.
candidatedynamic—candidate value consumed by this operation.

View source

normalToWorld

function normalToWorld(normal, basis)

Return the normal to world value.

ParameterTypeDefaultDescription
normaldynamic—normal value consumed by this operation.
basisdynamic—basis value consumed by this operation.

View source

pointContents

function pointContents(world, point)

Performs the pointContents operation for the miniquake2 client prediction world module.

ParameterTypeDefaultDescription
worlddynamic—world value consumed by this operation.
pointdynamic—point value consumed by this operation.

View source

predict

function predict(playerState, commands, collision, configStrings, snapshot, localEntityNumber, airAcceleration)

Return the predict value.

ParameterTypeDefaultDescription
playerStatedynamic—playerState value consumed by this operation.
commandsdynamic—commands value consumed by this operation.
collisiondynamic—collision value consumed by this operation.
configStringsdynamic—configStrings value consumed by this operation.
snapshotdynamic—snapshot value consumed by this operation.
localEntityNumberdynamic—localEntityNumber value consumed by this operation.
airAccelerationdynamic—airAcceleration value consumed by this operation.

View source

predictInto

function predictInto(world, workspace, playerState, commands, commandCount, collision, configStrings, snapshot, localEntityNumber, airAcceleration)

Session-owned form for the render loop. Both the collision-world wrapper and Pmove workspace retain identity across frames; only their live snapshot references and scalar inputs are updated before synchronous replay.

ParameterTypeDefaultDescription
worlddynamic—world value consumed by this operation.
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.
collisiondynamic—collision value consumed by this operation.
configStringsdynamic—configStrings value consumed by this operation.
snapshotdynamic—snapshot value consumed by this operation.
localEntityNumberdynamic—localEntityNumber value consumed by this operation.
airAccelerationdynamic—airAcceleration value consumed by this operation.

View source

predictionPointContents

function predictionPointContents(point)

Return the prediction point contents value.

ParameterTypeDefaultDescription
pointdynamic—point value consumed by this operation.

View source

predictionTrace

function predictionTrace(start, mins, maxs, finish)

Trace prediction.

ParameterTypeDefaultDescription
startdynamic—start value consumed by this operation.
minsdynamic—mins value consumed by this operation.
maxsdynamic—maxs value consumed by this operation.
finishdynamic—finish value consumed by this operation.

View source

miniquake2.client.prediction_world.PredictionWorld struct

textSlice

function textSlice(value, start, count)

Performs the textSlice operation for the miniquake2 client prediction world module.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.
startdynamic—start value consumed by this operation.
countdynamic—Number of items or units to process.

View source

toModel

function toModel(point, origin, basis)

Return the to model value.

ParameterTypeDefaultDescription
pointdynamic—point value consumed by this operation.
origindynamic—origin value consumed by this operation.
basisdynamic—basis value consumed by this operation.

View source

trace

function trace(world, start, mins, maxs, finish)

Trace state.

ParameterTypeDefaultDescription
worlddynamic—world value consumed by this operation.
startdynamic—start value consumed by this operation.
minsdynamic—mins value consumed by this operation.
maxsdynamic—maxs value consumed by this operation.
finishdynamic—finish value consumed by this operation.

View source

traceEntities

function traceEntities(world, start, mins, maxs, finish, best)

Trace entities.

ParameterTypeDefaultDescription
worlddynamic—world value consumed by this operation.
startdynamic—start value consumed by this operation.
minsdynamic—mins value consumed by this operation.
maxsdynamic—maxs value consumed by this operation.
finishdynamic—finish value consumed by this operation.
bestdynamic—best value consumed by this operation.

View source

vec

inline function vec(values)

Return the vec value.

ParameterTypeDefaultDescription
valuesdynamic—values value consumed by this operation.

View source