MiniQuake

src/miniquake/server.ml

Package
miniquake.server
Reachable
Yes

Imports

Declarations

acceptLocal

function acceptLocal(server, socket)

Implements the `acceptLocal` operation for `miniquake.server` (accept local).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
socketdynamic—Network socket used for communication.

View source

appendBaselines

function appendBaselines(server)

Add state for append baselines.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

appendDatagram

function appendDatagram(destination, source)

Add state for append datagram.

ParameterTypeDefaultDescription
destinationdynamic—Destination value or collection to update.
sourcedynamic—Source value or collection to read.

View source

appendQuakeCSignon

function appendQuakeCSignon(server, contextValue)

Add state for append quake csignon.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
contextValuedynamic—The context value input consumed by `appendQuakeCSignon`.

View source

assignModelIndexes

function assignModelIndexes(server)

Implements the `assignModelIndexes` operation for `miniquake.server` (assign model indexes).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

beginChangeLevel

function beginChangeLevel(server)

Initialize state for begin change level.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

boolArray

function boolArray(count, defaultValue)

----------------------------------------------------------------------------- QuakeC-backed server spawning and per-frame execution. -----------------------------------------------------------------------------

ParameterTypeDefaultDescription
countdynamic—Number of entries or units to process.
defaultValuedynamic—The default value input consumed by `boolArray`.

View source

boundsOverlap

function boundsOverlap(originA, minsA, maxsA, originB, minsB, maxsB)

Implements the `boundsOverlap` operation for `miniquake.server` (bounds overlap).

ParameterTypeDefaultDescription
originAdynamic—The origin a input consumed by `boundsOverlap`.
minsAdynamic—The mins a input consumed by `boundsOverlap`.
maxsAdynamic—The maxs a input consumed by `boundsOverlap`.
originBdynamic—The origin b input consumed by `boundsOverlap`.
minsBdynamic—The mins b input consumed by `boundsOverlap`.
maxsBdynamic—The maxs b input consumed by `boundsOverlap`.

View source

broadcastPrint

function broadcastPrint(server, text)

Implements the `broadcastPrint` operation for `miniquake.server` (broadcast print).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
textdynamic—Text to parse or process.

View source

buildModelPrecache

function buildModelPrecache(server)

Create and initialize model precache.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

buildSignon

function buildSignon(server)

Create and initialize signon.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

cleanMapName

function cleanMapName(name)

Return clean map name derived from the active module state.

ParameterTypeDefaultDescription
namedynamic—Stable name that identifies the requested object or option.

View source

cleanupMuzzleFlashes

function cleanupMuzzleFlashes(server)

Implements the `cleanupMuzzleFlashes` operation for `miniquake.server` (cleanup muzzle flashes).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

clearInvisibleClientTargets

function clearInvisibleClientTargets(server, clientValue)

Drop references from active monsters to a player who has become invisible. FL_NOTARGET prevents new checkclient acquisitions; clearing existing enemy state makes the custom command take effect immediately for alerted monsters.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `clearInvisibleClientTargets`.

View source

clientFloat

function clientFloat(server, clientValue, fieldName, fallback)

Implements the `clientFloat` operation for `miniquake.server` (client float).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `clientFloat`.
fieldNamedynamic—Name that identifies the requested value or resource.
fallbackdynamic—Value to use when the requested input is unavailable or invalid.

View source

clientItems

function clientItems(server, entityIndex, player)

Implements the `clientItems` operation for `miniquake.server` (client items).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
entityIndexdynamic—Zero-based index of the requested entry.
playerdynamic—The player input consumed by `clientItems`.

View source

clientMessageBuffers

function clientMessageBuffers(server)

Implements the `clientMessageBuffers` operation for `miniquake.server` (client message buffers).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

clientPrint

function clientPrint(clientValue, text)

Implements the `clientPrint` operation for `miniquake.server` (client print).

ParameterTypeDefaultDescription
clientValuedynamic—The client value input consumed by `clientPrint`.
textdynamic—Text to parse or process.

View source

clientSpawnParmBuffers

function clientSpawnParmBuffers(server)

Implements the `clientSpawnParmBuffers` operation for `miniquake.server` (client spawn parm buffers).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

clientWeaponModelIndex

function clientWeaponModelIndex(server, entityIndex, fallback)

Return client weapon model index derived from the active module state.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
entityIndexdynamic—Zero-based index of the requested entry.
fallbackdynamic—Value to use when the requested input is unavailable or invalid.

View source

colorComponent

function colorComponent(value)

Implements the `colorComponent` operation for `miniquake.server` (color component).

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `colorComponent`.

View source

commandText

function commandText(args, first)

Implements the `commandText` operation for `miniquake.server` (command text).

ParameterTypeDefaultDescription
argsdynamic—Command-line arguments supplied by the host process.
firstdynamic—The first input consumed by `commandText`.

View source

copyGlobalsToSpawnParms

function copyGlobalsToSpawnParms(server, clientValue)

Transfer data for copy globals to spawn parms.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `copyGlobalsToSpawnParms`.

View source

copyNumberArray

function copyNumberArray(values)

Transfer data for copy number array.

ParameterTypeDefaultDescription
valuesdynamic—The values input consumed by `copyNumberArray`.

View source

copySpawnParmsToGlobals

function copySpawnParmsToGlobals(server, clientValue)

Transfer data for copy spawn parms to globals.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `copySpawnParmsToGlobals`.

View source

create

function create(maxClients)

Implements the `create` operation for `miniquake.server` (create).

ParameterTypeDefaultDescription
maxClientsdynamic—The max clients input consumed by `create`.

View source

createEdictRuntime

function createEdictRuntime(maxEdicts, reservedClients)

Create and initialize edict runtime.

ParameterTypeDefaultDescription
maxEdictsdynamic—The max edicts input consumed by `createEdictRuntime`.
reservedClientsdynamic—The reserved clients input consumed by `createEdictRuntime`.

View source

createQuakeCContext

function createQuakeCContext(server, filesystem, registry, commandSystem, runtime)

Create and initialize quake ccontext.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
filesystemdynamic—The filesystem input consumed by `createQuakeCContext`.
registrydynamic—The registry input consumed by `createQuakeCContext`.
commandSystemdynamic—The command system input consumed by `createQuakeCContext`.
runtimedynamic—Time value used by the operation.

View source

createServerClient

function createServerClient(index)

Create and initialize server client.

ParameterTypeDefaultDescription
indexdynamic—Zero-based index of the requested entry.

View source

defaultLightStyles

function defaultLightStyles()

Implements the `defaultLightStyles` operation for `miniquake.server` (default light styles).

View source

distributeReliableDatagram

function distributeReliableDatagram(server)

Implements the `distributeReliableDatagram` operation for `miniquake.server` (distribute reliable datagram).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

dropClient

function dropClient(server, client, crashed)

Release state for drop client.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientdynamic—Client state participating in the operation.
crasheddynamic—The crashed input consumed by `dropClient`.

View source

dropTimedOutClients

function dropTimedOutClients(server, timeoutSeconds)

Release state for drop timed out clients.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
timeoutSecondsdynamic—The timeout seconds input consumed by `dropTimedOutClients`.

View source

ensureSynchronizedBaseline

function ensureSynchronizedBaseline(item, entityIndex)

Ensure sufficient storage or state for synchronized baseline.

ParameterTypeDefaultDescription
itemdynamic—The item input consumed by `ensureSynchronizedBaseline`.
entityIndexdynamic—Zero-based index of the requested entry.

View source

ensureSynchronizedEdict

function ensureSynchronizedEdict(server, entityIndex)

Ensure sufficient storage or state for synchronized edict.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
entityIndexdynamic—Zero-based index of the requested entry.

View source

entityCenter

function entityCenter(item)

Implements the `entityCenter` operation for `miniquake.server` (entity center).

ParameterTypeDefaultDescription
itemdynamic—The item input consumed by `entityCenter`.

View source

entityFloatValue

function entityFloatValue(server, item, fieldName, fallback)

Return entity float value derived from the active module state.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
itemdynamic—The item input consumed by `entityFloatValue`.
fieldNamedynamic—Name that identifies the requested value or resource.
fallbackdynamic—Value to use when the requested input is unavailable or invalid.

View source

entityIsPriorityProjectile

function entityIsPriorityProjectile(item)

Report whether an entity is a latency-sensitive projectile that must be scheduled before ordinary snapshot entities. Rockets and expansion-pack missiles use MOVETYPE_FLYMISSILE; the stock grenade is a bouncing entity and therefore also needs its model-name discriminator.

ParameterTypeDefaultDescription
itemdynamic—The item input consumed by `entityIsPriorityProjectile`.

View source

entityUpdateBits

function entityUpdateBits(server, item)

Return entity update bits derived from the active module state.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
itemdynamic—The item input consumed by `entityUpdateBits`.

View source

entityUpdateValues

function entityUpdateValues(server, item)

Return entity update values derived from the active module state.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
itemdynamic—The item input consumed by `entityUpdateValues`.

View source

entityVisible

function entityVisible(server, pvs, item, clientEdict)

Report whether entity visible holds for the active state.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
pvsdynamic—The pvs input consumed by `entityVisible`.
itemdynamic—The item input consumed by `entityVisible`.
clientEdictdynamic—The client edict input consumed by `entityVisible`.

View source

executePusherThink

function executePusherThink(server, pusherIndex)

Execute pusher think.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
pusherIndexdynamic—Zero-based index of the requested entry.

View source

executeQcFunction

function executeQcFunction(server, functionName, selfIndex, otherIndex)

Execute qc function.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
functionNamedynamic—Name that identifies the requested value or resource.
selfIndexdynamic—Zero-based index of the requested entry.
otherIndexdynamic—Zero-based index of the requested entry.

View source

executeStringCommand

function executeStringCommand(server, client, text, player)

Execute string command.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientdynamic—Client state participating in the operation.
textdynamic—Text to parse or process.
playerdynamic—The player input consumed by `executeStringCommand`.

View source

failSpawn

function failSpawn(server, result)

Report spawn and return the corresponding failure status.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
resultdynamic—Result value to report or translate into a status code.

View source

finishChangeLevel

function finishChangeLevel(server, snapshot)

Finalize state for finish change level.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
snapshotdynamic—The snapshot input consumed by `finishChangeLevel`.

View source

flushQuakeCEvents

function flushQuakeCEvents(server)

Implements the `flushQuakeCEvents` operation for `miniquake.server` (flush quake c events).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

frame

function frame(server, player, frameTime, registry)

Implements the `frame` operation for `miniquake.server` (frame).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
playerdynamic—The player input consumed by `frame`.
frameTimedynamic—Time value used by the operation.
registrydynamic—The registry input consumed by `frame`.

View source

frameMode

function frameMode(server, player, frameTime, registry, simulate)

Advance mode by one processing step.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
playerdynamic—The player input consumed by `frameMode`.
frameTimedynamic—Time value used by the operation.
registrydynamic—The registry input consumed by `frameMode`.
simulatedynamic—The simulate input consumed by `frameMode`.

View source

globalSpawnParmOffset

function globalSpawnParmOffset(machine, index)

Return global spawn parm offset derived from the active module state.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `globalSpawnParmOffset`.
indexdynamic—Zero-based index of the requested entry.

View source

hasBspSuffix

function hasBspSuffix(name)

Report whether bsp suffix.

ParameterTypeDefaultDescription
namedynamic—Stable name that identifies the requested object or option.

View source

Host_Begin_f

function Host_Begin_f(clientValue)

Apply the Quake-compatible host begin f behavior.

ParameterTypeDefaultDescription
clientValuedynamic—The client value input consumed by `Host_Begin_f`.

View source

Host_Color_f

function Host_Color_f(server, clientValue, args)

Apply the Quake-compatible host color f behavior.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `Host_Color_f`.
argsdynamic—Command-line arguments supplied by the host process.

View source

Host_Fly_f

function Host_Fly_f(server, clientValue)

Apply the Quake-compatible host fly f behavior.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `Host_Fly_f`.

View source

Host_Give_f

function Host_Give_f(server, clientValue, args)

Apply the Quake-compatible host give f behavior.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `Host_Give_f`.
argsdynamic—Command-line arguments supplied by the host process.

View source

Host_God_f

function Host_God_f(server, clientValue)

Apply the Quake-compatible host god f behavior.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `Host_God_f`.

View source

Host_Invisible_f

function Host_Invisible_f(server, clientValue)

Toggle the MiniQuake AI-invisibility cheat. The stock FL_NOTARGET bit keeps standard QuakeC and compatible mods on their original target-selection path.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `Host_Invisible_f`.

View source

Host_Kick_f

function Host_Kick_f(server, sourceClient, args)

Apply the Quake-compatible host kick f behavior.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
sourceClientdynamic—The source client input consumed by `Host_Kick_f`.
argsdynamic—Command-line arguments supplied by the host process.

View source

Host_Kill_f

function Host_Kill_f(server, clientValue)

Apply the Quake-compatible host kill f behavior.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `Host_Kill_f`.

View source

Host_Name_f

function Host_Name_f(server, clientValue, args)

Apply the Quake-compatible host name f behavior.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `Host_Name_f`.
argsdynamic—Command-line arguments supplied by the host process.

View source

Host_Noclip_f

function Host_Noclip_f(server, clientValue)

Apply the Quake-compatible host noclip f behavior.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `Host_Noclip_f`.

View source

Host_Notarget_f

function Host_Notarget_f(server, clientValue)

Apply the Quake-compatible host notarget f behavior.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `Host_Notarget_f`.

View source

Host_Pause_f

function Host_Pause_f(server, clientValue)

Apply the Quake-compatible host pause f behavior.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `Host_Pause_f`.

View source

Host_Ping_f

function Host_Ping_f(server, requester)

Apply the Quake-compatible host ping f behavior.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
requesterdynamic—The requester input consumed by `Host_Ping_f`.

View source

Host_PreSpawn_f

function Host_PreSpawn_f(server, clientValue)

Apply the Quake-compatible host pre spawn f behavior.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `Host_PreSpawn_f`.

View source

Host_Say

function Host_Say(server, sender, args, teamOnly)

Apply the Quake-compatible host say behavior.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
senderdynamic—The sender input consumed by `Host_Say`.
argsdynamic—Command-line arguments supplied by the host process.
teamOnlydynamic—The team only input consumed by `Host_Say`.

View source

Host_Say_f

function Host_Say_f(server, sender, args)

Apply the Quake-compatible host say f behavior.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
senderdynamic—The sender input consumed by `Host_Say_f`.
argsdynamic—Command-line arguments supplied by the host process.

View source

Host_Say_Team_f

function Host_Say_Team_f(server, sender, args)

Apply the Quake-compatible host say team f behavior.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
senderdynamic—The sender input consumed by `Host_Say_Team_f`.
argsdynamic—Command-line arguments supplied by the host process.

View source

Host_Spawn_f

function Host_Spawn_f(server, clientValue, player)

Apply the Quake-compatible host spawn f behavior.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `Host_Spawn_f`.
playerdynamic—The player input consumed by `Host_Spawn_f`.

View source

Host_Status_f

function Host_Status_f(server, requester)

Apply the Quake-compatible host status f behavior.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
requesterdynamic—The requester input consumed by `Host_Status_f`.

View source

Host_Tell_f

function Host_Tell_f(server, sender, args)

Apply the Quake-compatible host tell f behavior.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
senderdynamic—The sender input consumed by `Host_Tell_f`.
argsdynamic—Command-line arguments supplied by the host process.

View source

loadEdicts

function loadEdicts(server, map)

Read and validate edicts.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
mapdynamic—The map input consumed by `loadEdicts`.

View source

makePlayerEdict

function makePlayerEdict(number)

Create and initialize player edict.

ParameterTypeDefaultDescription
numberdynamic—The number input consumed by `makePlayerEdict`.

View source

modelIndex

function modelIndex(server, name)

Return model index derived from the active module state.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
namedynamic—Stable name that identifies the requested object or option.

View source

movePusher

function movePusher(server, pusherIndex, moveTime)

SV_PushMove. The pusher is moved first, every affected entity is carried by the same delta, and the complete operation is rolled back when one entity cannot be displaced. This is the stock Quake door/platform/train contract.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
pusherIndexdynamic—Zero-based index of the requested entry.
moveTimedynamic—Time value used by the operation.

View source

moveQcEntity

function moveQcEntity(server, entityIndex, frameTime, gravity)

Transfer data for move qc entity.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
entityIndexdynamic—Zero-based index of the requested entry.
frameTimedynamic—Time value used by the operation.
gravitydynamic—The gravity input consumed by `moveQcEntity`.

View source

numberArray

function numberArray(count, defaultValue)

Implements the `numberArray` operation for `miniquake.server` (number array).

ParameterTypeDefaultDescription
countdynamic—Number of entries or units to process.
defaultValuedynamic—The default value input consumed by `numberArray`.

View source

physicsFrameParameters

function physicsFrameParameters(registry)

Apply server-physics frame parameters semantics.

ParameterTypeDefaultDescription
registrydynamic—The registry input consumed by `physicsFrameParameters`.

View source

physicsPusher

function physicsPusher(server, entityIndex, frameTime)

Apply server-physics pusher semantics.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
entityIndexdynamic—Zero-based index of the requested entry.
frameTimedynamic—Time value used by the operation.

View source

placeClient

function placeClient(server, client, player)

Place one client at the new level's selected spawn point.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientdynamic—Client state participating in the operation.
playerdynamic—The player input consumed by `placeClient`.

View source

playerProtocolFlags

function playerProtocolFlags(player)

PlayerState keeps groundedness in `onGround`, while the original network writer consumes FL_ONGROUND from ent->v.flags. Rebuild this mirrored bit for PlayerState-only adapter paths so stale flags cannot drop or invent SU_ONGROUND. QuakeC-backed paths still replace the value with QC flags.

ParameterTypeDefaultDescription
playerdynamic—The player input consumed by `playerProtocolFlags`.

View source

playerStateForClient

function playerStateForClient(server, clientValue, hostPlayer)

The listen-server loopback client shares the host's render/input PlayerState. Every remote client needs an independent mirror of its own QuakeC edict. Socketless single-client fixtures predate ServerClient.playerState and keep using the supplied host state so their public frameMode contract is stable.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `playerStateForClient`.
hostPlayerdynamic—The host player input consumed by `playerStateForClient`.

View source

precacheClientFrameLookups

function precacheClientFrameLookups(server, fallbackPlayer)

Warm the pure field/function lookup paths used by the first client physics frame. No QuakeC code is executed and no game time advances; authoritative player values are written and read back unchanged.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
fallbackPlayerdynamic—The fallback player input consumed by `precacheClientFrameLookups`.

View source

prepareReliableMessages

function prepareReliableMessages(server)

Implements the `prepareReliableMessages` operation for `miniquake.server` (prepare reliable messages).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

preserveClientConnections

function preserveClientConnections(server)

Implements the `preserveClientConnections` operation for `miniquake.server` (preserve client connections).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

privilegedCommandAllowed

inline function privilegedCommandAllowed(server, clientValue)

Implements the `privilegedCommandAllowed` operation for `miniquake.server` (privileged command allowed).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `privilegedCommandAllowed`.

View source

processReliableClientAt

function processReliableClientAt(server, clientValue, realtime)

Execute reliable client at.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `processReliableClientAt`.
realtimedynamic—Time value used by the operation.

View source

protocolBaseline

function protocolBaseline(server, item)

Implements the `protocolBaseline` operation for `miniquake.server` (protocol baseline).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
itemdynamic—The item input consumed by `protocolBaseline`.

View source

protocolClientData

function protocolClientData(server, client, player)

Return protocol client data derived from the active module state.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientdynamic—Client state participating in the operation.
playerdynamic—The player input consumed by `protocolClientData`.

View source

pumpClientMessages

function pumpClientMessages(server, player)

Advance client messages by one processing step.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
playerdynamic—The player input consumed by `pumpClientMessages`.

View source

qcEntityVector

function qcEntityVector(server, entityIndex, name)

Return qc entity vector derived from the active module state.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
entityIndexdynamic—Zero-based index of the requested entry.
namedynamic—Stable name that identifies the requested object or option.

View source

qcFloat

function qcFloat(machine, entityIndex, fieldName, fallback)

Implements the `qcFloat` operation for `miniquake.server` (qc float).

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `qcFloat`.
entityIndexdynamic—Zero-based index of the requested entry.
fieldNamedynamic—Name that identifies the requested value or resource.
fallbackdynamic—Value to use when the requested input is unavailable or invalid.

View source

qcFloatAt

function qcFloatAt(machine, entityIndex, offset, fallback)

Implements the `qcFloatAt` operation for `miniquake.server` (qc float at).

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `qcFloatAt`.
entityIndexdynamic—Zero-based index of the requested entry.
offsetdynamic—Zero-based offset of the requested data.
fallbackdynamic—Value to use when the requested input is unavailable or invalid.

View source

qcSetFlags

function qcSetFlags(server, entityIndex, flags)

Implements the `qcSetFlags` operation for `miniquake.server` (qc set flags).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
entityIndexdynamic—Zero-based index of the requested entry.
flagsdynamic—The flags input consumed by `qcSetFlags`.

View source

qcString

function qcString(machine, entityIndex, fieldName, fallback)

Implements the `qcString` operation for `miniquake.server` (qc string).

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `qcString`.
entityIndexdynamic—Zero-based index of the requested entry.
fieldNamedynamic—Name that identifies the requested value or resource.
fallbackdynamic—Value to use when the requested input is unavailable or invalid.

View source

qcStringAt

function qcStringAt(machine, entityIndex, offset, fallback)

Implements the `qcStringAt` operation for `miniquake.server` (qc string at).

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `qcStringAt`.
entityIndexdynamic—Zero-based index of the requested entry.
offsetdynamic—Zero-based offset of the requested data.
fallbackdynamic—Value to use when the requested input is unavailable or invalid.

View source

qcVector

function qcVector(machine, entityIndex, fieldName, fallback)

Return qc vector derived from the active module state.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `qcVector`.
entityIndexdynamic—Zero-based index of the requested entry.
fieldNamedynamic—Name that identifies the requested value or resource.
fallbackdynamic—Value to use when the requested input is unavailable or invalid.

View source

qcWord

function qcWord(machine, entityIndex, fieldName, fallback)

Implements the `qcWord` operation for `miniquake.server` (qc word).

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `qcWord`.
entityIndexdynamic—Zero-based index of the requested entry.
fieldNamedynamic—Name that identifies the requested value or resource.
fallbackdynamic—Value to use when the requested input is unavailable or invalid.

View source

qcWordAt

function qcWordAt(machine, entityIndex, offset, fallback)

Implements the `qcWordAt` operation for `miniquake.server` (qc word at).

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `qcWordAt`.
entityIndexdynamic—Zero-based index of the requested entry.
offsetdynamic—Zero-based offset of the requested data.
fallbackdynamic—Value to use when the requested input is unavailable or invalid.

View source

queuedSoundOrigin

function queuedSoundOrigin(server, entityIndex)

Add state for queued sound origin.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
entityIndexdynamic—Zero-based index of the requested entry.

View source

readClientMessage

function readClientMessage(server, client, data, player)

Read and validate client message.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientdynamic—Client state participating in the operation.
datadynamic—Input data consumed by the operation.
playerdynamic—The player input consumed by `readClientMessage`.

View source

readMove

function readMove(server, reader, client)

Read and validate move.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
readerdynamic—The reader input consumed by `readMove`.
clientdynamic—Client state participating in the operation.

View source

recomputeEdictCount

function recomputeEdictCount(server)

Return recompute edict count derived from the active module state.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

requireSynchronizedVector

function requireSynchronizedVector(value, entityIndex, fieldName)

Validate synchronized vector and report any invalid state.

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `requireSynchronizedVector`.
entityIndexdynamic—Zero-based index of the requested entry.
fieldNamedynamic—Name that identifies the requested value or resource.

View source

resetClientMessageForConnect

function resetClientMessageForConnect(clientValue)

Update module state for client message for connect.

ParameterTypeDefaultDescription
clientValuedynamic—The client value input consumed by `resetClientMessageForConnect`.

View source

resetPlayerForSpawn

function resetPlayerForSpawn(player, origin, angles)

Reset the detached PlayerState mirror like SV_SpawnServer's cleared client edict before ClientConnect and PutClientInServer initialize the new level.

ParameterTypeDefaultDescription
playerdynamic—The player input consumed by `resetPlayerForSpawn`.
origindynamic—World-space origin of the operation.
anglesdynamic—Orientation angles used by the operation.

View source

resizeClients

function resizeClients(server, requested)

Implements the `resizeClients` operation for `miniquake.server` (resize clients).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
requesteddynamic—The requested input consumed by `resizeClients`.

View source

resizeSynchronizedEdictArray

function resizeSynchronizedEdictArray(server, requiredCount)

Implements the `resizeSynchronizedEdictArray` operation for `miniquake.server` (resize synchronized edict array).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
requiredCountdynamic—Number of entries or units to process.

View source

resolvePlayerEntityCollision

function resolvePlayerEntityCollision(server, clientValue, player, oldOrigin)

Implements the `resolvePlayerEntityCollision` operation for `miniquake.server` (resolve player entity collision).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `resolvePlayerEntityCollision`.
playerdynamic—The player input consumed by `resolvePlayerEntityCollision`.
oldOrigindynamic—The old origin input consumed by `resolvePlayerEntityCollision`.

View source

runEntityThink

function runEntityThink(server, entityIndex, frameTime)

Execute entity think.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
entityIndexdynamic—Zero-based index of the requested entry.
frameTimedynamic—Time value used by the operation.

View source

runNonClientPhysics

function runNonClientPhysics(server, frameTime, registry)

Execute non client physics.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
frameTimedynamic—Time value used by the operation.
registrydynamic—The registry input consumed by `runNonClientPhysics`.

View source

runNonClientPhysicsWithRetouch

function runNonClientPhysicsWithRetouch(server, frameTime, registry, forceRetouch)

Execute non client physics with retouch.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
frameTimedynamic—Time value used by the operation.
registrydynamic—The registry input consumed by `runNonClientPhysicsWithRetouch`.
forceRetouchdynamic—The force retouch input consumed by `runNonClientPhysicsWithRetouch`.

View source

runQcBlocked

function runQcBlocked(server, pusherIndex, otherIndex)

Execute qc blocked.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
pusherIndexdynamic—Zero-based index of the requested entry.
otherIndexdynamic—Zero-based index of the requested entry.

View source

runQcTouch

function runQcTouch(server, entityIndex, otherIndex)

Execute qc touch.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
entityIndexdynamic—Zero-based index of the requested entry.
otherIndexdynamic—Zero-based index of the requested entry.

View source

runQuakeCFrame

function runQuakeCFrame(server, frameTime)

Execute quake cframe.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
frameTimedynamic—Time value used by the operation.

View source

runWorldPhysicsWithRetouch

function runWorldPhysicsWithRetouch(server, frameTime, registry, forceRetouch)

Execute world physics with retouch.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
frameTimedynamic—Time value used by the operation.
registrydynamic—The registry input consumed by `runWorldPhysicsWithRetouch`.
forceRetouchdynamic—The force retouch input consumed by `runWorldPhysicsWithRetouch`.

View source

saveSpawnParmsForChange

function saveSpawnParmsForChange(server)

Encode and write spawn parms for change.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

sendBuffer

function sendBuffer(client, buffer)

Send buffer through the active connection.

ParameterTypeDefaultDescription
clientdynamic—Client state participating in the operation.
bufferdynamic—The buffer input consumed by `sendBuffer`.

View source

sendClientEye

sendClientEye

SV_WriteEntitiesToClient uses one stack vec3 for the client eye position in the C engine. Keep the MiniLang equivalent as a stable scratch value rather than allocating two temporary Vec3 objects for every client snapshot.

View source

sendClientFrame

function sendClientFrame(server, client, player)

Send client frame through the active connection.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientdynamic—Client state participating in the operation.
playerdynamic—The player input consumed by `sendClientFrame`.

View source

sendClientMessages

function sendClientMessages(server, player)

Send client messages through the active connection.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
playerdynamic—The player input consumed by `sendClientMessages`.

View source

sendClientMessagesAt

function sendClientMessagesAt(server, player, realtime)

Send client messages at through the active connection.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
playerdynamic—The player input consumed by `sendClientMessagesAt`.
realtimedynamic—Time value used by the operation.

View source

sendNopAt

function sendNopAt(server, clientValue, realtime)

Send nop at through the active connection.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `sendNopAt`.
realtimedynamic—Time value used by the operation.

View source

sendReconnect

function sendReconnect(server)

Send reconnect through the active connection.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

sendReliableMessages

function sendReliableMessages(server)

Send reliable messages through the active connection.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

sendReliableMessagesAt

function sendReliableMessagesAt(server, realtime)

Reliable-only pump used by the explicit local signon loop. The full server frame calls sendClientMessagesAt so spawned clients receive their unreliable datagram before this reliable phase.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
realtimedynamic—Time value used by the operation.

View source

sendServerInfo

function sendServerInfo(server, client)

Send server info through the active connection.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientdynamic—Client state participating in the operation.

View source

serverGameType

function serverGameType(server)

Return server game type derived from the active module state.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

serverProgsCrc

function serverProgsCrc(server)

Return server progs crc derived from the active module state.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

setClientColors

function setClientColors(server, clientValue, topValue, bottomValue)

Update module state for client colors.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `setClientColors`.
topValuedynamic—The top value input consumed by `setClientColors`.
bottomValuedynamic—The bottom value input consumed by `setClientColors`.

View source

setClientFloat

function setClientFloat(server, clientValue, fieldName, value)

Update module state for client float.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `setClientFloat`.
fieldNamedynamic—Name that identifies the requested value or resource.
valuedynamic—Value consumed by `setClientFloat`.

View source

setClientIdealPitch

function setClientIdealPitch(server, client, player, pitchScale)

SV_SetIdealPitch. This mirrors sv_user.c's six point traces and deliberately truncates each sampled height delta to the original C int `step`.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientdynamic—Client state participating in the operation.
playerdynamic—The player input consumed by `setClientIdealPitch`.
pitchScaledynamic—The pitch scale input consumed by `setClientIdealPitch`.

View source

setClientName

function setClientName(server, clientValue, newName)

Update module state for client name.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `setClientName`.
newNamedynamic—Name that identifies the requested value or resource.

View source

setGiveField

function setGiveField(server, clientValue, name, value)

Update module state for give field.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `setGiveField`.
namedynamic—Stable name that identifies the requested object or option.
valuedynamic—Value consumed by `setGiveField`.

View source

setQcEntityFloat

function setQcEntityFloat(server, entityIndex, fieldName, value)

Update module state for qc entity float.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
entityIndexdynamic—Zero-based index of the requested entry.
fieldNamedynamic—Name that identifies the requested value or resource.
valuedynamic—Value consumed by `setQcEntityFloat`.

View source

setQcEntityVector

function setQcEntityVector(server, entityIndex, fieldName, value)

Update module state for qc entity vector.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
entityIndexdynamic—Zero-based index of the requested entry.
fieldNamedynamic—Name that identifies the requested value or resource.
valuedynamic—Value consumed by `setQcEntityVector`.

View source

setQcEntityWord

function setQcEntityWord(server, entityIndex, fieldName, value)

Update module state for qc entity word.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
entityIndexdynamic—Zero-based index of the requested entry.
fieldNamedynamic—Name that identifies the requested value or resource.
valuedynamic—Value consumed by `setQcEntityWord`.

View source

setSynchronizedVector

function setSynchronizedVector(value, entityIndex, fieldName, x, y, z)

Update module state for synchronized vector.

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `setSynchronizedVector`.
entityIndexdynamic—Zero-based index of the requested entry.
fieldNamedynamic—Name that identifies the requested value or resource.
xdynamic—The x input consumed by `setSynchronizedVector`.
ydynamic—The y input consumed by `setSynchronizedVector`.
zdynamic—The z input consumed by `setSynchronizedVector`.

View source

shutdown

function shutdown(server)

Implements the `shutdown` operation for `miniquake.server` (shutdown).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

soundIndex

function soundIndex(server, name)

Return sound index derived from the active module state.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
namedynamic—Stable name that identifies the requested object or option.

View source

spawn

function spawn(server, filesystem, mapName, skill)

Implements the `spawn` operation for `miniquake.server` (spawn).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
filesystemdynamic—The filesystem input consumed by `spawn`.
mapNamedynamic—Name of the map to load or inspect.
skilldynamic—The skill input consumed by `spawn`.

View source

spawnRuntime

function spawnRuntime(server, filesystem, mapName, skill, registry, commandSystem)

Allocate and initialize runtime.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
filesystemdynamic—The filesystem input consumed by `spawnRuntime`.
mapNamedynamic—Name of the map to load or inspect.
skilldynamic—The skill input consumed by `spawnRuntime`.
registrydynamic—The registry input consumed by `spawnRuntime`.
commandSystemdynamic—The command system input consumed by `spawnRuntime`.

View source

syncCommandToQuakeC

function syncCommandToQuakeC(server, clientValue)

Update module state for command to quake c.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `syncCommandToQuakeC`.

View source

syncEstablishedQcVectorIntoAt

function syncEstablishedQcVectorIntoAt(machine, entityIndex, offset, target, x, y, z)

Copy one snapshot vector into an established mirror slot. Spawn and load synchronization have already validated every nested Vec3 before the server can publish snapshots, so repeating a dynamic type-name lookup here for four vectors on every live edict only burns frame time. Keep the guarded helper above for lifecycle boundaries where incomplete external state is possible.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `syncEstablishedQcVectorIntoAt`.
entityIndexdynamic—Zero-based index of the requested entry.
offsetdynamic—Zero-based offset of the requested data.
targetdynamic—The target input consumed by `syncEstablishedQcVectorIntoAt`.
xdynamic—The x input consumed by `syncEstablishedQcVectorIntoAt`.
ydynamic—The y input consumed by `syncEstablishedQcVectorIntoAt`.
zdynamic—The z input consumed by `syncEstablishedQcVectorIntoAt`.

View source

synchronizedEdictOffsets

function synchronizedEdictOffsets(machine)

The C engine resolves ddef_t offsets while loading progs.dat and then uses direct word offsets for every edict. Resolve the MiniLang mirror's fixed synchronization set once per range instead of scanning fieldDefs 18 times for every live edict on every server frame.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `synchronizedEdictOffsets`.

View source

synchronizedOffsetMachine

synchronizedOffsetMachine

Tracks the module-level synchronized offset machine state owned by `miniquake.server`.

View source

synchronizedOffsets

synchronizedOffsets

Tracks the module-level synchronized offsets state owned by `miniquake.server`.

View source

synchronizedVectorTarget

function synchronizedVectorTarget(value, entityIndex, fieldName, x, y, z)

The original server keeps edicts in one stable array and mutates their fields in place. Rebuilding every QuakeEdict and every nested Vec3 on each frame creates avoidable allocation pressure and makes object lifetime depend on expression-temporary GC roots. Keep the derived MiniLang mirror stable: allocate only when the high-water mark grows or a previously absent record appears, then copy raw QuakeC words into the existing structs.

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `synchronizedVectorTarget`.
entityIndexdynamic—Zero-based index of the requested entry.
fieldNamedynamic—Name that identifies the requested value or resource.
xdynamic—The x input consumed by `synchronizedVectorTarget`.
ydynamic—The y input consumed by `synchronizedVectorTarget`.
zdynamic—The z input consumed by `synchronizedVectorTarget`.

View source

syncLoadedQuakeCEdicts

function syncLoadedQuakeCEdicts(server, savedCount)

Update module state for loaded quake cedicts.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
savedCountdynamic—Number of entries or units to process.

View source

syncPlayerFromQuakeC

function syncPlayerFromQuakeC(server, clientValue, player)

Update module state for player from quake c.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `syncPlayerFromQuakeC`.
playerdynamic—The player input consumed by `syncPlayerFromQuakeC`.

View source

syncPlayerToQuakeC

function syncPlayerToQuakeC(server, clientValue, player)

Update module state for player to quake c.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `syncPlayerToQuakeC`.
playerdynamic—The player input consumed by `syncPlayerToQuakeC`.

View source

syncQcVectorInto

function syncQcVectorInto(machine, entityIndex, fieldName, target, x, y, z)

Update module state for qc vector into.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `syncQcVectorInto`.
entityIndexdynamic—Zero-based index of the requested entry.
fieldNamedynamic—Name that identifies the requested value or resource.
targetdynamic—The target input consumed by `syncQcVectorInto`.
xdynamic—The x input consumed by `syncQcVectorInto`.
ydynamic—The y input consumed by `syncQcVectorInto`.
zdynamic—The z input consumed by `syncQcVectorInto`.

View source

syncQcVectorIntoAt

function syncQcVectorIntoAt(machine, entityIndex, offset, fieldName, target, x, y, z)

Update module state for qc vector into at.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `syncQcVectorIntoAt`.
entityIndexdynamic—Zero-based index of the requested entry.
offsetdynamic—Zero-based offset of the requested data.
fieldNamedynamic—Name that identifies the requested value or resource.
targetdynamic—The target input consumed by `syncQcVectorIntoAt`.
xdynamic—The x input consumed by `syncQcVectorIntoAt`.
ydynamic—The y input consumed by `syncQcVectorIntoAt`.
zdynamic—The z input consumed by `syncQcVectorIntoAt`.

View source

syncQuakeCEdict

function syncQuakeCEdict(server, entityIndex)

Update module state for quake cedict.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
entityIndexdynamic—Zero-based index of the requested entry.

View source

syncQuakeCEdictAt

function syncQuakeCEdictAt(server, entityIndex, offsets)

Update module state for quake cedict at.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
entityIndexdynamic—Zero-based index of the requested entry.
offsetsdynamic—The offsets input consumed by `syncQuakeCEdictAt`.

View source

syncQuakeCEdictRange

function syncQuakeCEdictRange(server, count)

Update module state for quake cedict range.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
countdynamic—Number of entries or units to process.

View source

syncQuakeCEdicts

function syncQuakeCEdicts(server)

Update module state for quake cedicts.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

syncQuakeCSnapshotEdictAt

function syncQuakeCSnapshotEdictAt(server, entityIndex, offsets)

Synchronize only fields consumed by client snapshot encoding. Physics and collision already operate on the authoritative VM edicts; the full mirror remains available for lifecycle/save/compatibility boundaries.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
entityIndexdynamic—Zero-based index of the requested entry.
offsetsdynamic—The offsets input consumed by `syncQuakeCSnapshotEdictAt`.

View source

syncQuakeCSnapshotEdicts

function syncQuakeCSnapshotEdicts(server)

Update the stable client-snapshot mirror without copying server-only fields.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

touchPlayerTriggers

function touchPlayerTriggers(server, clientValue, player)

Implements the `touchPlayerTriggers` operation for `miniquake.server` (touch player triggers).

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientValuedynamic—The client value input consumed by `touchPlayerTriggers`.
playerdynamic—The player input consumed by `touchPlayerTriggers`.

View source

truncateBytes

function truncateBytes(text, maximum)

Return truncate bytes derived from the active module state.

ParameterTypeDefaultDescription
textdynamic—Text to parse or process.
maximumdynamic—Largest accepted value.

View source

updateReliableClientState

function updateReliableClientState(server)

Update module state for reliable client state.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.

View source

writeBaseline

function writeBaseline(buffer, item)

Writes baseline for `miniquake.server`.

ParameterTypeDefaultDescription
bufferdynamic—The buffer input consumed by `writeBaseline`.
itemdynamic—The item input consumed by `writeBaseline`.

View source

writeBegin

function writeBegin(client)

Encode and write begin.

ParameterTypeDefaultDescription
clientdynamic—Client state participating in the operation.

View source

writeClientData

function writeClientData(buffer, player)

Encode and write client data.

ParameterTypeDefaultDescription
bufferdynamic—The buffer input consumed by `writeClientData`.
playerdynamic—The player input consumed by `writeClientData`.

View source

writeClientDataForClient

function writeClientDataForClient(buffer, server, client, player)

Encode and write client data for client.

ParameterTypeDefaultDescription
bufferdynamic—The buffer input consumed by `writeClientDataForClient`.
serverdynamic—Server state participating in the operation.
clientdynamic—Client state participating in the operation.
playerdynamic—The player input consumed by `writeClientDataForClient`.

View source

writeClientDataWithFlags

function writeClientDataWithFlags(buffer, player, serverFlags)

Encode and write client data with flags.

ParameterTypeDefaultDescription
bufferdynamic—The buffer input consumed by `writeClientDataWithFlags`.
playerdynamic—The player input consumed by `writeClientDataWithFlags`.
serverFlagsdynamic—The server flags input consumed by `writeClientDataWithFlags`.

View source

writeDamage

function writeDamage(server, client, buffer)

Encode and write damage.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientdynamic—Client state participating in the operation.
bufferdynamic—The buffer input consumed by `writeDamage`.

View source

writeDamageAndAngle

function writeDamageAndAngle(server, client, player, buffer)

Encode and write damage and angle.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientdynamic—Client state participating in the operation.
playerdynamic—The player input consumed by `writeDamageAndAngle`.
bufferdynamic—The buffer input consumed by `writeDamageAndAngle`.

View source

writeEntityUpdate

function writeEntityUpdate(server, buffer, item)

Encode and write entity update.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
bufferdynamic—The buffer input consumed by `writeEntityUpdate`.
itemdynamic—The item input consumed by `writeEntityUpdate`.

View source

writeFixAngle

function writeFixAngle(server, client, player, buffer)

Encode and write fix angle.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientdynamic—Client state participating in the operation.
playerdynamic—The player input consumed by `writeFixAngle`.
bufferdynamic—The buffer input consumed by `writeFixAngle`.

View source

writePlannedEntityUpdate

function writePlannedEntityUpdate(server, buffer, item)

Encode and write planned entity update.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
bufferdynamic—The buffer input consumed by `writePlannedEntityUpdate`.
itemdynamic—The item input consumed by `writePlannedEntityUpdate`.

View source

writePlannedEntityUpdateReserved

function writePlannedEntityUpdateReserved(server, buffer, item, reservedBytes)

Encode and write planned entity update reserved.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
bufferdynamic—The buffer input consumed by `writePlannedEntityUpdateReserved`.
itemdynamic—The item input consumed by `writePlannedEntityUpdateReserved`.
reservedBytesdynamic—Byte data consumed by the operation.

View source

writePlayerUpdate

function writePlayerUpdate(server, buffer, client, player)

Encode and write player update.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
bufferdynamic—The buffer input consumed by `writePlayerUpdate`.
clientdynamic—Client state participating in the operation.
playerdynamic—The player input consumed by `writePlayerUpdate`.

View source

writeQueuedParticle

function writeQueuedParticle(server, event)

Encode and write queued particle.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
eventdynamic—Runtime event to process.

View source

writeQueuedSound

function writeQueuedSound(server, event)

Encode and write queued sound.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
eventdynamic—Runtime event to process.

View source

writeSignonStage2

function writeSignonStage2(server, client)

Encode and write signon stage2.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientdynamic—Client state participating in the operation.

View source

writeSpawn

function writeSpawn(server, client, player)

Encode and write spawn.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
clientdynamic—Client state participating in the operation.
playerdynamic—The player input consumed by `writeSpawn`.

View source

writeVisibleEntityClassReserved

function writeVisibleEntityClassReserved(server, buffer, pvs, clientEdict, reservedBytes, priorityProjectiles)

Write one snapshot class while retaining the Protocol-15 packet budget. The caller selects either priority projectiles or ordinary entities; the client edict is handled separately so it can never be duplicated.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
bufferdynamic—The buffer input consumed by `writeVisibleEntityClassReserved`.
pvsdynamic—The pvs input consumed by `writeVisibleEntityClassReserved`.
clientEdictdynamic—The client edict input consumed by `writeVisibleEntityClassReserved`.
reservedBytesdynamic—Byte data consumed by the operation.
priorityProjectilesdynamic—The priority projectiles input consumed by `writeVisibleEntityClassReserved`.

View source

writeVisibleEntityUpdatesReserved

function writeVisibleEntityUpdatesReserved(server, buffer, pvs, clientEdict, reservedBytes)

Write a complete visible-entity snapshot with the player and active projectiles ahead of less time-sensitive entities. Protocol 15 accepts fast updates in any entity order. Prioritization prevents a high-numbered rocket or grenade from disappearing when a dense PVS reaches MAX_DATAGRAM.

ParameterTypeDefaultDescription
serverdynamic—Server state participating in the operation.
bufferdynamic—The buffer input consumed by `writeVisibleEntityUpdatesReserved`.
pvsdynamic—The pvs input consumed by `writeVisibleEntityUpdatesReserved`.
clientEdictdynamic—The client edict input consumed by `writeVisibleEntityUpdatesReserved`.
reservedBytesdynamic—Byte data consumed by the operation.

View source

zeroSpawnParms

function zeroSpawnParms()

Create the zero-initialized state for spawn parms.

View source