# activeClients
function activeClients(session)Report whether active clients.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
src/miniquake2/runtime/multiplayer_session.mlProvides miniquake2 runtime multiplayer session facilities for this project.
miniquake2/game/integration/baseq2.ml as mpsbaseq2 → src/miniquake2/game/integration/baseq2.mlminiquake2/game/null_game.ml as mpsgameapi → src/miniquake2/game/null_game.mlminiquake2/network/constants.ml as mpsnetworkconstants → src/miniquake2/network/constants.mlminiquake2/platform/system.ml as mpsplatformsystem → src/miniquake2/platform/system.mlminiquake2/qcommon/byteio.ml as mpsbyteio → src/miniquake2/qcommon/byteio.mlminiquake2/qcommon/types.ml as mpsqtypes → src/miniquake2/qcommon/types.mlminiquake2/runtime/client_session.ml as mpsclientsession → src/miniquake2/runtime/client_session.mlminiquake2/runtime/media_sequence.ml as mpsmediasequence → src/miniquake2/runtime/media_sequence.mlminiquake2/runtime/server_session.ml as mpsserversession → src/miniquake2/runtime/server_session.mlfunction activeClients(session)Report whether active clients.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
function changeMapCore(session, mapName, entityText, collision, maximumSteps)Performs the changeMapCore operation for the miniquake2 runtime multiplayer session module.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
mapName | dynamic | — | mapName value consumed by this operation. |
entityText | dynamic | — | entityText value consumed by this operation. |
collision | dynamic | — | collision value consumed by this operation. |
maximumSteps | dynamic | — | maximumSteps value consumed by this operation. |
function changeMapRetail(session, baseDirectory, mapName, maximumSteps)Performs the changeMapRetail operation for the miniquake2 runtime multiplayer session module.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
baseDirectory | dynamic | — | baseDirectory value consumed by this operation. |
mapName | dynamic | — | mapName value consumed by this operation. |
maximumSteps | dynamic | — | maximumSteps value consumed by this operation. |
function checkedClientIndex(session, clientIndex, operation)Return the checked client index.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
clientIndex | dynamic | — | Zero-based index of client. |
operation | dynamic | — | operation value consumed by this operation. |
function createCore(mode, mapName, entityText, collision, userInfos)Creates core for the miniquake2 runtime multiplayer session module.
| Parameter | Type | Default | Description |
|---|---|---|---|
mode | dynamic | — | Mode selecting the requested behavior. |
mapName | dynamic | — | mapName value consumed by this operation. |
entityText | dynamic | — | entityText value consumed by this operation. |
collision | dynamic | — | collision value consumed by this operation. |
userInfos | dynamic | — | userInfos value consumed by this operation. |
function createCoreAtSkill(mode, mapName, entityText, collision, userInfos, skill)Creates core at skill for the miniquake2 runtime multiplayer session module.
| Parameter | Type | Default | Description |
|---|---|---|---|
mode | dynamic | — | Mode selecting the requested behavior. |
mapName | dynamic | — | mapName value consumed by this operation. |
entityText | dynamic | — | entityText value consumed by this operation. |
collision | dynamic | — | collision value consumed by this operation. |
userInfos | dynamic | — | userInfos value consumed by this operation. |
skill | dynamic | — | skill value consumed by this operation. |
function createRetail(mode, baseDirectory, mapName, userInfos)Creates retail for the miniquake2 runtime multiplayer session module.
| Parameter | Type | Default | Description |
|---|---|---|---|
mode | dynamic | — | Mode selecting the requested behavior. |
baseDirectory | dynamic | — | baseDirectory value consumed by this operation. |
mapName | dynamic | — | mapName value consumed by this operation. |
userInfos | dynamic | — | userInfos value consumed by this operation. |
function createRetailAtSkill(mode, baseDirectory, mapName, userInfos, skill)Creates retail at skill for the miniquake2 runtime multiplayer session module.
| Parameter | Type | Default | Description |
|---|---|---|---|
mode | dynamic | — | Mode selecting the requested behavior. |
baseDirectory | dynamic | — | baseDirectory value consumed by this operation. |
mapName | dynamic | — | mapName value consumed by this operation. |
userInfos | dynamic | — | userInfos value consumed by this operation. |
skill | dynamic | — | skill value consumed by this operation. |
function disconnectClient(session, clientIndex)Return the disconnect client value.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
clientIndex | dynamic | — | Zero-based index of client. |
const MAX_CLIENT_COUNT = 8Defines the max client count constant used by the miniquake2 runtime multiplayer session module.
const MIN_CLIENT_COUNT = 2Defines the min client count constant used by the miniquake2 runtime multiplayer session module.
const MODE_COOP = "coop"Defines the mode coop constant used by the miniquake2 runtime multiplayer session module.
const MODE_DEATHMATCH = "deathmatch"Defines the mode deathmatch constant used by the miniquake2 runtime multiplayer session module.
miniquake2.runtime.multiplayer_session.MultiplayerSession struct
miniquake2.runtime.multiplayer_session.MultiplayerStepResult struct
function player(session, clientIndex)Return the player value.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
clientIndex | dynamic | — | Zero-based index of client. |
function prepareCombatPair(session, attackerIndex, victimIndex, distance)Test/product harness helper only establishes a deterministic unobstructed duel. It never invokes combat/death code: damage must arrive through the normal client UserCmd -> WeaponThink -> weapon trace/projectile callbacks.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
attackerIndex | dynamic | — | Zero-based index of attacker. |
victimIndex | dynamic | — | Zero-based index of victim. |
distance | dynamic | — | distance value consumed by this operation. |
function prepareCoopPair(session, attackerIndex, victimIndex, distance)Prepare coop pair.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
attackerIndex | dynamic | — | Zero-based index of attacker. |
victimIndex | dynamic | — | Zero-based index of victim. |
distance | dynamic | — | distance value consumed by this operation. |
function prepareDuel(session, attackerIndex, victimIndex, distance)Prepare duel.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
attackerIndex | dynamic | — | Zero-based index of attacker. |
victimIndex | dynamic | — | Zero-based index of victim. |
distance | dynamic | — | distance value consumed by this operation. |
function queueUserCmd(session, clientIndex, command)Queue user cmd.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
clientIndex | dynamic | — | Zero-based index of client. |
command | dynamic | — | command value consumed by this operation. |
function reconnectClient(session, clientIndex, userInfo)Return the reconnect client value.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
clientIndex | dynamic | — | Zero-based index of client. |
userInfo | dynamic | — | userInfo value consumed by this operation. |
function result(session)Performs the result operation for the miniquake2 runtime multiplayer session module.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
function runUntilActive(session, maximumSteps)Report whether run until active.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
maximumSteps | dynamic | — | maximumSteps value consumed by this operation. |
function serverSlot(session, clientIndex)Return the server slot value.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
clientIndex | dynamic | — | Zero-based index of client. |
function setUserInfo(session, clientIndex, userInfo)Set user info.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
clientIndex | dynamic | — | Zero-based index of client. |
userInfo | dynamic | — | userInfo value consumed by this operation. |
function shutdown(session)Performs the shutdown operation for the miniquake2 runtime multiplayer session module.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
function signonComplete(session)Return the signon complete value.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
function snapshotHasEntity(session, clientIndex, entityNumber)Report whether snapshot has entity.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
clientIndex | dynamic | — | Zero-based index of client. |
entityNumber | dynamic | — | entityNumber value consumed by this operation. |
function step(session)Performs the step operation for the miniquake2 runtime multiplayer session module.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
function synchronizeScores(session)Synchronize scores.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
function takeQueuedMap(session)Report whether take queued map.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
function touchItem(session, clientIndex, className)Handle item.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | dynamic | — | session value consumed by this operation. |
clientIndex | dynamic | — | Zero-based index of client. |
className | dynamic | — | className value consumed by this operation. |
function validateMode(mode)Validate mode.
| Parameter | Type | Default | Description |
|---|---|---|---|
mode | dynamic | — | Mode selecting the requested behavior. |
function validateUserInfos(userInfos)Validate user infos.
| Parameter | Type | Default | Description |
|---|---|---|---|
userInfos | dynamic | — | userInfos value consumed by this operation. |
function wrap(mode, server, userInfos)Wrap state.
| Parameter | Type | Default | Description |
|---|---|---|---|
mode | dynamic | — | Mode selecting the requested behavior. |
server | dynamic | — | server value consumed by this operation. |
userInfos | dynamic | — | userInfos value consumed by this operation. |