# activePredictionWorld
activePredictionWorldStores module-wide active prediction world state for the miniquake2 client prediction world module.
src/miniquake2/client/prediction_world.mlProvides miniquake2 client prediction world facilities for this project.
miniquake2/client/prediction.ml as pwprediction → src/miniquake2/client/prediction.mlminiquake2/collision/model.ml as pwcollision → src/miniquake2/collision/model.mlminiquake2/physics/vector.ml as pwvector → src/miniquake2/physics/vector.mlminiquake2/qcommon/constants.ml as pwqc → src/miniquake2/qcommon/constants.mlminiquake2/qcommon/types.ml as pwqt → src/miniquake2/qcommon/types.mlactivePredictionWorldStores module-wide active prediction world state for the miniquake2 client prediction world module.
const BOX_EPSILON = 3.125e-002Defines the box epsilon constant used by the miniquake2 client prediction world module.
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
start | dynamic | — | start value consumed by this operation. |
mins | dynamic | — | mins value consumed by this operation. |
maxs | dynamic | — | maxs value consumed by this operation. |
finish | dynamic | — | finish value consumed by this operation. |
entity | dynamic | — | entity value consumed by this operation. |
function collisionTrace(result, entity)Trace collision.
| Parameter | Type | Default | Description |
|---|---|---|---|
result | dynamic | — | Result object populated or inspected by the operation. |
entity | dynamic | — | entity value consumed by this operation. |
function createPredictionWorkspace()Create prediction workspace.
function createWorld()Create world.
inline function dot(first, second)Performs the dot operation for the miniquake2 client prediction world module.
| Parameter | Type | Default | Description |
|---|---|---|---|
first | dynamic | — | first value consumed by this operation. |
second | dynamic | — | second value consumed by this operation. |
function emptyTrace(finish)Report whether empty trace.
| Parameter | Type | Default | Description |
|---|---|---|---|
finish | dynamic | — | finish value consumed by this operation. |
function inlineModelNumber(world, modelIndex)Return the inline model number.
| Parameter | Type | Default | Description |
|---|---|---|---|
world | dynamic | — | world value consumed by this operation. |
modelIndex | dynamic | — | Zero-based index of model. |
function mergeTrace(best, candidate)Merge trace.
| Parameter | Type | Default | Description |
|---|---|---|---|
best | dynamic | — | best value consumed by this operation. |
candidate | dynamic | — | candidate value consumed by this operation. |
function normalToWorld(normal, basis)Return the normal to world value.
| Parameter | Type | Default | Description |
|---|---|---|---|
normal | dynamic | — | normal value consumed by this operation. |
basis | dynamic | — | basis value consumed by this operation. |
function pointContents(world, point)Performs the pointContents operation for the miniquake2 client prediction world module.
| Parameter | Type | Default | Description |
|---|---|---|---|
world | dynamic | — | world value consumed by this operation. |
point | dynamic | — | point value consumed by this operation. |
function predict(playerState, commands, collision, configStrings, snapshot, localEntityNumber, airAcceleration)Return the predict value.
| Parameter | Type | Default | Description |
|---|---|---|---|
playerState | dynamic | — | playerState value consumed by this operation. |
commands | dynamic | — | commands value consumed by this operation. |
collision | dynamic | — | collision value consumed by this operation. |
configStrings | dynamic | — | configStrings value consumed by this operation. |
snapshot | dynamic | — | snapshot value consumed by this operation. |
localEntityNumber | dynamic | — | localEntityNumber value consumed by this operation. |
airAcceleration | dynamic | — | airAcceleration value consumed by this operation. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
world | dynamic | — | world value consumed by this operation. |
workspace | dynamic | — | workspace value consumed by this operation. |
playerState | dynamic | — | playerState value consumed by this operation. |
commands | dynamic | — | commands value consumed by this operation. |
commandCount | dynamic | — | Number of command to process. |
collision | dynamic | — | collision value consumed by this operation. |
configStrings | dynamic | — | configStrings value consumed by this operation. |
snapshot | dynamic | — | snapshot value consumed by this operation. |
localEntityNumber | dynamic | — | localEntityNumber value consumed by this operation. |
airAcceleration | dynamic | — | airAcceleration value consumed by this operation. |
function predictionPointContents(point)Return the prediction point contents value.
| Parameter | Type | Default | Description |
|---|---|---|---|
point | dynamic | — | point value consumed by this operation. |
function predictionTrace(start, mins, maxs, finish)Trace prediction.
| Parameter | Type | Default | Description |
|---|---|---|---|
start | dynamic | — | start value consumed by this operation. |
mins | dynamic | — | mins value consumed by this operation. |
maxs | dynamic | — | maxs value consumed by this operation. |
finish | dynamic | — | finish value consumed by this operation. |
miniquake2.client.prediction_world.PredictionWorld struct
function textSlice(value, start, count)Performs the textSlice operation for the miniquake2 client prediction world module.
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed or transformed by the operation. |
start | dynamic | — | start value consumed by this operation. |
count | dynamic | — | Number of items or units to process. |
function toModel(point, origin, basis)Return the to model value.
| Parameter | Type | Default | Description |
|---|---|---|---|
point | dynamic | — | point value consumed by this operation. |
origin | dynamic | — | origin value consumed by this operation. |
basis | dynamic | — | basis value consumed by this operation. |
function trace(world, start, mins, maxs, finish)Trace state.
| Parameter | Type | Default | Description |
|---|---|---|---|
world | dynamic | — | world value consumed by this operation. |
start | dynamic | — | start value consumed by this operation. |
mins | dynamic | — | mins value consumed by this operation. |
maxs | dynamic | — | maxs value consumed by this operation. |
finish | dynamic | — | finish value consumed by this operation. |
function traceEntities(world, start, mins, maxs, finish, best)Trace entities.
| Parameter | Type | Default | Description |
|---|---|---|---|
world | dynamic | — | world value consumed by this operation. |
start | dynamic | — | start value consumed by this operation. |
mins | dynamic | — | mins value consumed by this operation. |
maxs | dynamic | — | maxs value consumed by this operation. |
finish | dynamic | — | finish value consumed by this operation. |
best | dynamic | — | best value consumed by this operation. |
inline function vec(values)Return the vec value.
| Parameter | Type | Default | Description |
|---|---|---|---|
values | dynamic | — | values value consumed by this operation. |