# CLIENT_COMMAND_MSEC
const CLIENT_COMMAND_MSEC = 11Defines the client command msec constant used by the miniquake2 runtime client session module.
src/miniquake2/runtime/client_session.mlProvides miniquake2 runtime client session facilities for this project.
miniquake2/client/downloads.ml as csdownloads → src/miniquake2/client/downloads.mlminiquake2/client/effects/state.ml as cseffects → src/miniquake2/client/effects/state.mlminiquake2/client/prediction.ml as csprediction → src/miniquake2/client/prediction.mlminiquake2/client/prediction_world.ml as cspredictionworld → src/miniquake2/client/prediction_world.mlminiquake2/client/runtime/dispatcher.ml as csdispatcher → src/miniquake2/client/runtime/dispatcher.mlminiquake2/client/state.ml as csstate → src/miniquake2/client/state.mlminiquake2/network/client.ml as csnclient → src/miniquake2/network/client.mlminiquake2/network/constants.ml as csnc → src/miniquake2/network/constants.mlminiquake2/network/runtime/commands.ml as cscommands → src/miniquake2/network/runtime/commands.mlminiquake2/network/runtime/pump.ml as cspump → src/miniquake2/network/runtime/pump.mlminiquake2/network/runtime/transport.ml as cstransport → src/miniquake2/network/runtime/transport.mlminiquake2/network/runtime/types.ml as csnrtypes → src/miniquake2/network/runtime/types.mlminiquake2/platform/system.ml as cssystem → src/miniquake2/platform/system.mlminiquake2/platform/udp.ml as csudp → src/miniquake2/platform/udp.mlminiquake2/protocol/constants.ml as cspc → src/miniquake2/protocol/constants.mlminiquake2/protocol/netchan.ml as cspnetchan → src/miniquake2/protocol/netchan.mlminiquake2/protocol/types.ml as cspt → src/miniquake2/protocol/types.mlminiquake2/qcommon/byteio.ml as csqbyteio → src/miniquake2/qcommon/byteio.mlminiquake2/qcommon/cmd.ml as csqcmd → src/miniquake2/qcommon/cmd.mlminiquake2/qcommon/constants.ml as csqconstants → src/miniquake2/qcommon/constants.mlminiquake2/qcommon/sizebuf.ml as csqsz → src/miniquake2/qcommon/sizebuf.mlminiquake2/qcommon/types.ml as csqtypes → src/miniquake2/qcommon/types.mlconst CLIENT_COMMAND_MSEC = 11Defines the client command msec constant used by the miniquake2 runtime client session module.
miniquake2.runtime.client_session.ClientSession struct
const CMD_BACKUP = 64Defines the cmd backup constant used by the miniquake2 runtime client session module.
const CMD_MASK = 63Defines the cmd mask constant used by the miniquake2 runtime client session module.
function configureDownloads(session, manager)Configure downloads.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
manager | dynamic | — | manager value consumed by this operation. |
function copyUserCmdInto(output, command)Populate the copy user cmd destination.
| Parameter | Type | Default | Description |
|---|---|---|---|
output | dynamic | — | Output collection or buffer populated by the operation. |
command | dynamic | — | command value consumed by this operation. |
function create(serverAddress, serverPort, userInfo, localPort)Creates create for the miniquake2 runtime client session module.
| Parameter | Type | Default | Description |
|---|---|---|---|
serverAddress | dynamic | — | serverAddress value consumed by this operation. |
serverPort | dynamic | — | serverPort value consumed by this operation. |
userInfo | dynamic | — | userInfo value consumed by this operation. |
localPort | dynamic | — | localPort value consumed by this operation. |
function createPredictionCommandScratch()Create prediction command scratch.
function fillPredictionCommands(session, previewCommand, output)Allocation-stable form used by the product render loop. History entries are session-owned immutable copies; the preview is consumed synchronously by prediction, which copies each command into its reusable Pmove command.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
previewCommand | dynamic | — | previewCommand value consumed by this operation. |
output | dynamic | — | Output collection or buffer populated by the operation. |
function makeOriginScratch(count)Create origin scratch.
| Parameter | Type | Default | Description |
|---|---|---|---|
count | dynamic | — | Number of items or units to process. |
function makeUserCmdScratch(count)Create user cmd scratch.
| Parameter | Type | Default | Description |
|---|---|---|---|
count | dynamic | — | Number of items or units to process. |
const MAX_PENDING_USERCMDS = 64Defines the max pending usercmds constant used by the miniquake2 runtime client session module.
function movementDue(previousTime, now)Return the movement due value.
| Parameter | Type | Default | Description |
|---|---|---|---|
previousTime | dynamic | — | previousTime value consumed by this operation. |
now | dynamic | — | now value consumed by this operation. |
function nextUserCmd(session)Return the next user cmd value.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
function pendingUserCmds(session)Report whether pending user cmds.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
function poll(session)Receive/ACK/signon half of a listen-server tick without synthesizing a second usercmd for the same UI frame.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
function predictionCommands(session, previewCommand)Return exactly the unacknowledged cmd ring followed by the current render preview. Missing pre-active/sign-on sequences are intentionally skipped.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
previewCommand | dynamic | — | previewCommand value consumed by this operation. |
function predictionSequence(session)Return the prediction sequence value.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
function predictRemote(session, previewCommand, collision)CL_PredictMovement for a real remote client: replay the unacknowledged command ring against the locally loaded BSP plus the current packet-entity solids. Listen play may keep using its authoritative Game-API bridge.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
previewCommand | dynamic | — | previewCommand value consumed by this operation. |
collision | dynamic | — | collision value consumed by this operation. |
function processDownloads(session, now)Process downloads.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
now | dynamic | — | now value consumed by this operation. |
function processSignon(session, now)Process signon.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
now | dynamic | — | now value consumed by this operation. |
function pump(session, sendMovement)Pump state.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
sendMovement | dynamic | — | sendMovement value consumed by this operation. |
function queueUserCmd(session, command)Queue preserves every input sample. The bounded backlog prevents a paused UI producer from causing unbounded latency when networking resumes.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
command | dynamic | — | command value consumed by this operation. |
function reconcilePrediction(session)Reconcile prediction.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
function resetMapInput(session)Reset map input.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
function resetUserCmd(output, msec)Reset user cmd.
| Parameter | Type | Default | Description |
|---|---|---|---|
output | dynamic | — | Output collection or buffer populated by the operation. |
msec | dynamic | — | msec value consumed by this operation. |
function run(session, frameLimit)Runs run for the miniquake2 runtime client session workflow.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
frameLimit | dynamic | — | frameLimit value consumed by this operation. |
function sendMove(session, now)Send move.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
now | dynamic | — | now value consumed by this operation. |
function sendStringCommand(session, command, now)Send string command.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
command | dynamic | — | command value consumed by this operation. |
now | dynamic | — | now value consumed by this operation. |
function sendUserInfo(session, userInfo, now)Send user info.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
userInfo | dynamic | — | userInfo value consumed by this operation. |
now | dynamic | — | now value consumed by this operation. |
inline function sequenceDistance(candidate, base)Return the sequence distance value.
| Parameter | Type | Default | Description |
|---|---|---|---|
candidate | dynamic | — | candidate value consumed by this operation. |
base | dynamic | — | base value consumed by this operation. |
function setUserCmd(session, command)Replace pending samples with the newest command, useful for frame-driven UI where old unsent mouse deltas must not be replayed later.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
command | dynamic | — | command value consumed by this operation. |
function shutdown(session)Performs the shutdown operation for the miniquake2 runtime client session module.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
function signonCommand(text)Return the signon command value.
| Parameter | Type | Default | Description |
|---|---|---|---|
text | dynamic | — | Text consumed by the operation. |
function step(session)Performs the step operation for the miniquake2 runtime client session module.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
function storePredictedOrigin(session, sequence, fixedOrigin)Return the store predicted origin.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
sequence | dynamic | — | sequence value consumed by this operation. |
fixedOrigin | dynamic | — | fixedOrigin value consumed by this operation. |
function synchronizeSpawnCount(session)Synchronize spawn count.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
function validatedMovement(value)Return the validated movement value.
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed or transformed by the operation. |
function validateUserCmd(command)Validate user cmd.
| Parameter | Type | Default | Description |
|---|---|---|---|
command | dynamic | — | command value consumed by this operation. |
function validateUserCmdInto(output, command)Populate the validate user cmd destination.
| Parameter | Type | Default | Description |
|---|---|---|---|
output | dynamic | — | Output collection or buffer populated by the operation. |
command | dynamic | — | command value consumed by this operation. |