MiniQuake2

src/miniquake2/game/null_game.ml

Provides miniquake2 game null game facilities for this project.

Package
miniquake2.game.null_game
Reachable
Yes

Imports

Declarations

activeBaseRuntime

activeBaseRuntime

Stores module-wide active base runtime state for the miniquake2 game null game module.

View source

activeExport

activeExport

Stores module-wide active export state for the miniquake2 game null game module.

View source

activeImports

activeImports

Stores module-wide active imports state for the miniquake2 game null game module.

View source

activeMaxClients

activeMaxClients

Stores module-wide active max clients state for the miniquake2 game null game module.

View source

activePlayerContext

activePlayerContext

Stores module-wide active player context state for the miniquake2 game null game module.

View source

activePmoveContentMask

activePmoveContentMask

Stores module-wide active pmove content mask state for the miniquake2 game null game module.

View source

activePmovePassEntity

activePmovePassEntity

Stores module-wide active pmove pass entity state for the miniquake2 game null game module.

View source

activeSkill

activeSkill

Stores module-wide active skill state for the miniquake2 game null game module.

View source

aiAreasConnected

function aiAreasConnected(first, second)

Report whether ai areas connected.

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

View source

aiInPHS

function aiInPHS(first, second)

Return the ai in phs value.

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

View source

aiTraceVisible

function aiTraceVisible(actor, other)

Report whether ai trace visible.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
otherdynamic—other value consumed by this operation.

View source

apiInstalled

function apiInstalled()

Return the api installed value.

View source

baseEdicts

function baseEdicts()

Return the base edicts value.

View source

baseRuntime

function baseRuntime()

Return the base runtime value.

View source

baseWorldAreaPortal

function baseWorldAreaPortal(style, isOpen)

Return the base world area portal value.

ParameterTypeDefaultDescription
styledynamic—style value consumed by this operation.
isOpendynamic—isOpen value consumed by this operation.

View source

baseWorldBeginIntermission

function baseWorldBeginIntermission(entity, mapName)

Begin base world intermission.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
mapNamedynamic—mapName value consumed by this operation.

View source

baseWorldCenter

function baseWorldCenter(entity, message)

Return the base world center value.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
messagedynamic—Human-readable message associated with the operation.

View source

baseWorldChangeLevel

function baseWorldChangeLevel(entity, other, activator, mapName)

Return the base world change level value.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
otherdynamic—other value consumed by this operation.
activatordynamic—activator value consumed by this operation.
mapNamedynamic—mapName value consumed by this operation.

View source

baseWorldLog

function baseWorldLog(message)

Return the base world log value.

ParameterTypeDefaultDescription
messagedynamic—Human-readable message associated with the operation.

View source

baseWorldSound

function baseWorldSound(entity, soundName)

Return the base world sound value.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
soundNamedynamic—soundName value consumed by this operation.

View source

baseWorldTargetExplosion

function baseWorldTargetExplosion(origin)

Return the base world target explosion value.

ParameterTypeDefaultDescription
origindynamic—origin value consumed by this operation.

View source

baseWorldTargetSplash

function baseWorldTargetSplash(origin, direction, count, sounds)

Return the base world target splash value.

ParameterTypeDefaultDescription
origindynamic—origin value consumed by this operation.
directiondynamic—direction value consumed by this operation.
countdynamic—Number of items or units to process.
soundsdynamic—sounds value consumed by this operation.

View source

captureRunFrameOrigins

function captureRunFrameOrigins(exportTable)

Capture the stock `s.old_origin = s.origin` value-copy contract before any player, mover, monster or projectile mutates the exported state.

ParameterTypeDefaultDescription
exportTabledynamic—exportTable value consumed by this operation.

View source

chatFloodAllowed

function chatFloodAllowed(slot, player, context)

Return the chat flood allowed value.

ParameterTypeDefaultDescription
slotdynamic—slot value consumed by this operation.
playerdynamic—player value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

chatTeamName

function chatTeamName(player, dmFlags)

Return the chat team name.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.
dmFlagsdynamic—dmFlags value consumed by this operation.

View source

cheatsAllowed

function cheatsAllowed(slot, context)

Return the cheats allowed value.

ParameterTypeDefaultDescription
slotdynamic—slot value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

checkedClientEdict

function checkedClientEdict(entity, operation)

Return the checked client edict value.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
operationdynamic—operation value consumed by this operation.

View source

ClientBegin

function ClientBegin(entity)

Begin client.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.

View source

ClientCommand

function ClientCommand(entity)

Dispatch the complete stock baseq2 client-command surface. Intermission and cheat gates are checked here so individual command helpers cannot bypass them.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.

View source

clientCommandCount

clientCommandCount

Stores module-wide client command count state for the miniquake2 game null game module.

View source

ClientConnect

function ClientConnect(entity, userInfo)

Performs the ClientConnect operation for the miniquake2 game null game module.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
userInfodynamic—userInfo value consumed by this operation.

View source

ClientDisconnect

function ClientDisconnect(entity)

Return the client disconnect value.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.

View source

ClientThink

function ClientThink(entity, command)

Run client.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
commanddynamic—command value consumed by this operation.

View source

ClientUserinfoChanged

function ClientUserinfoChanged(entity, userInfo)

Return the client userinfo changed value.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
userInfodynamic—userInfo value consumed by this operation.

View source

configuredGameSkill

function configuredGameSkill()

Return the configured game skill value.

View source

configureIntegratedRuntime

function configureIntegratedRuntime(runtime, playerContext)

Configure integrated runtime.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
playerContextdynamic—playerContext value consumed by this operation.

View source

configureMaxClients

function configureMaxClients(count)

Configure max clients.

ParameterTypeDefaultDescription
countdynamic—Number of items or units to process.

View source

configureSkill

function configureSkill(skill)

Configure skill.

ParameterTypeDefaultDescription
skilldynamic—skill value consumed by this operation.

View source

currentEntityString

currentEntityString

Stores module-wide current entity string state for the miniquake2 game null game module.

View source

currentMap

currentMap

Stores module-wide current map state for the miniquake2 game null game module.

View source

currentSpawnPoint

currentSpawnPoint

Stores module-wide current spawn point state for the miniquake2 game null game module.

View source

DEATHMATCH_STATUSBAR

const DEATHMATCH_STATUSBAR = "yb -24 xv 0 hnum xv 50 pic 0 if 2 xv 100 anum xv 150 pic 2 endif if 4 xv 200 rnum xv 250 pic 4 endif if 6 xv 296 pic 6 endif yb -50 if 7 xv 0 pic 7 xv 26 yb -42 stat_string 8 yb -50 endif if 9 xv 246 num 2 10 xv 296 pic 9 endif if 11 xv 148 pic 11 endif xr -50 yt 2 num 3 14 if 17 xv 0 yb -58 string2 \"SPECTATOR MODE\" endif if 16 xv 0 yb -68 string \"Chasing\" xv 64 stat_string 16 endif"

Defines the deathmatch statusbar constant used by the miniquake2 game null game module.

View source

edictAt

function edictAt(index)

Return the edict for the requested position.

ParameterTypeDefaultDescription
indexdynamic—Zero-based index of the affected item.

View source

edictIndex

function edictIndex(entity)

Return the edict index.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.

View source

edictOffset

function edictOffset(index)

Return the edict offset.

ParameterTypeDefaultDescription
indexdynamic—Zero-based index of the affected item.

View source

executeItemDrop

function executeItemDrop(slot, player, context, item)

Execute item drop.

ParameterTypeDefaultDescription
slotdynamic—slot value consumed by this operation.
playerdynamic—player value consumed by this operation.
contextdynamic—Context that carries state for the operation.
itemdynamic—item value consumed by this operation.

View source

findPlayer

function findPlayer(index)

Find player.

ParameterTypeDefaultDescription
indexdynamic—Zero-based index of the affected item.

View source

frameNumber

frameNumber

Stores module-wide frame number state for the miniquake2 game null game module.

View source

GetGameApi

function GetGameApi(imports)

Return game api.

ParameterTypeDefaultDescription
importsdynamic—imports value consumed by this operation.

View source

giveItems

function giveItems(player, context, arguments)

Return the give items value.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.
contextdynamic—Context that carries state for the operation.
argumentsdynamic—arguments value consumed by this operation.

View source

helpLayout

function helpLayout(context)

Return the help layout value.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.

View source

Init

function Init()

Performs the Init operation for the miniquake2 game null game module.

View source

initialized

initialized

Stores module-wide initialized state for the miniquake2 game null game module.

View source

lastSpawnResult

lastSpawnResult

Stores module-wide last spawn result state for the miniquake2 game null game module.

View source

lastUserInfo

lastUserInfo

Stores module-wide last user info state for the miniquake2 game null game module.

View source

lifecycleSnapshot

function lifecycleSnapshot()

Return the lifecycle snapshot value.

View source

linkManagedEdicts

function linkManagedEdicts()

Link managed edicts.

View source

makeEdicts

function makeEdicts(count)

Create edicts.

ParameterTypeDefaultDescription
countdynamic—Number of items or units to process.

View source

mapLoaded

mapLoaded

Stores module-wide map loaded state for the miniquake2 game null game module.

View source

normalizedChatBody

function normalizedChatBody(command, arguments, includeCommand)

Return the normalized chat body value.

ParameterTypeDefaultDescription
commanddynamic—command value consumed by this operation.
argumentsdynamic—arguments value consumed by this operation.
includeCommanddynamic—includeCommand value consumed by this operation.

View source

onSameChatTeam

function onSameChatTeam(first, second, dmFlags)

Report whether on same chat team.

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

View source

playerContext

function playerContext()

Return the player context value.

View source

playerCopyBody

function playerCopyBody(player)

Copy the dead client into BaseQ2's fixed eight-entry body queue.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.

View source

playerDamage

function playerDamage(context, player, amount, damageFlags, meansOfDeath)

Return the player damage value.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
playerdynamic—player value consumed by this operation.
amountdynamic—amount value consumed by this operation.
damageFlagsdynamic—damageFlags value consumed by this operation.
meansOfDeathdynamic—meansOfDeath value consumed by this operation.

View source

playerForEdict

function playerForEdict(slot, operation, createIfMissing)

Return the player for edict value.

ParameterTypeDefaultDescription
slotdynamic—slot value consumed by this operation.
operationdynamic—operation value consumed by this operation.
createIfMissingdynamic—createIfMissing value consumed by this operation.

View source

playerListText

function playerListText(context)

Return the player list text value.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.

View source

playerPmoveTrace

function playerPmoveTrace(start, mins, maxs, finish)

Trace player pmove.

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

View source

playersText

function playersText(context)

Return the players text value.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.

View source

playerTouchEntity

function playerTouchEntity(entity, player)

Handle player entity.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
playerdynamic—player value consumed by this operation.

View source

playerTouchTriggers

function playerTouchTriggers(player)

Handle player triggers.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.

View source

publishRunFrameOrigins

function publishRunFrameOrigins(exportTable, capturedCount)

Reapply captured origins after managed world synchronization. Internal world records may use their own historical positions, but Protocol EntityState must always expose the value captured at the start of this server frame.

ParameterTypeDefaultDescription
exportTabledynamic—exportTable value consumed by this operation.
capturedCountdynamic—Number of captured to process.

View source

ReadGame

function ReadGame(filename)

Read game.

ParameterTypeDefaultDescription
filenamedynamic—filename value consumed by this operation.

View source

ReadLevel

function ReadLevel(filename)

Read level.

ParameterTypeDefaultDescription
filenamedynamic—filename value consumed by this operation.

View source

requireFunction

function requireFunction(value, name)

Require function.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.
namedynamic—Name of the affected item.

View source

requireInitialized

function requireInitialized(operation)

Require initialized.

ParameterTypeDefaultDescription
operationdynamic—operation value consumed by this operation.

View source

requireInstalled

function requireInstalled(operation)

Require installed.

ParameterTypeDefaultDescription
operationdynamic—operation value consumed by this operation.

View source

restoreManagedImage

function restoreManagedImage(image)

Restore managed image.

ParameterTypeDefaultDescription
imagedynamic—image value consumed by this operation.

View source

RunFrame

function RunFrame()

Run frame.

View source

runFrameEdictScratch

runFrameEdictScratch

G_RunFrame snapshots every edict origin before gameplay. Keep both the value

View source

runFrameOriginScratch

runFrameOriginScratch

Stores module-wide run frame origin scratch state for the miniquake2 game null game module.

View source

runtimeEdict

function runtimeEdict(number)

Return the runtime edict value.

ParameterTypeDefaultDescription
numberdynamic—number value consumed by this operation.

View source

scoreboardLayout

function scoreboardLayout(context)

p_hud.c DeathmatchScoreboardMessage, retaining its score order, 12-client display bound and Protocol-34 "client" layout command.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.

View source

sendChat

function sendChat(slot, player, context, team, includeCommand, command)

Send chat.

ParameterTypeDefaultDescription
slotdynamic—slot value consumed by this operation.
playerdynamic—player value consumed by this operation.
contextdynamic—Context that carries state for the operation.
teamdynamic—team value consumed by this operation.
includeCommanddynamic—includeCommand value consumed by this operation.
commanddynamic—command value consumed by this operation.

View source

sendInventory

function sendInventory(slot, player)

Send inventory.

ParameterTypeDefaultDescription
slotdynamic—slot value consumed by this operation.
playerdynamic—player value consumed by this operation.

View source

sendLayout

function sendLayout(slot, layout)

Send layout.

ParameterTypeDefaultDescription
slotdynamic—slot value consumed by this operation.
layoutdynamic—layout value consumed by this operation.

View source

sendScoreboard

function sendScoreboard(slot, context)

Send scoreboard.

ParameterTypeDefaultDescription
slotdynamic—slot value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

ServerCommand

function ServerCommand()

Return the server command value.

View source

serverCommandCount

serverCommandCount

Stores module-wide server command count state for the miniquake2 game null game module.

View source

Shutdown

function Shutdown()

Performs the Shutdown operation for the miniquake2 game null game module.

View source

SINGLE_STATUSBAR

const SINGLE_STATUSBAR = "yb -24 xv 0 hnum xv 50 pic 0 if 2 xv 100 anum xv 150 pic 2 endif if 4 xv 200 rnum xv 250 pic 4 endif if 6 xv 296 pic 6 endif yb -50 if 7 xv 0 pic 7 xv 26 yb -42 stat_string 8 yb -50 endif if 9 xv 262 num 2 10 xv 296 pic 9 endif if 11 xv 148 pic 11 endif"

Original BaseQ2 layout programs. Keeping each program in one immutable

View source

spawnedBaseEdicts

spawnedBaseEdicts

Stores module-wide spawned base edicts state for the miniquake2 game null game module.

View source

SpawnEntities

function SpawnEntities(mapName, entityString, spawnPoint)

Spawn entities.

ParameterTypeDefaultDescription
mapNamedynamic—mapName value consumed by this operation.
entityStringdynamic—entityString value consumed by this operation.
spawnPointdynamic—spawnPoint value consumed by this operation.

View source

spawnResult

function spawnResult()

Spawn result.

View source

stockLightStyles

stockLightStyles

Stores module-wide stock light styles state for the miniquake2 game null game module.

View source

validateGameImport

function validateGameImport(imports)

Validate game import.

ParameterTypeDefaultDescription
importsdynamic—imports value consumed by this operation.

View source

WriteGame

function WriteGame(filename, autosave)

Write game.

ParameterTypeDefaultDescription
filenamedynamic—filename value consumed by this operation.
autosavedynamic—autosave value consumed by this operation.

View source

WriteLevel

function WriteLevel(filename)

Write level.

ParameterTypeDefaultDescription
filenamedynamic—filename value consumed by this operation.

View source