# activeBaseRuntime
activeBaseRuntimeStores module-wide active base runtime state for the miniquake2 game null game module.
src/miniquake2/game/null_game.mlProvides miniquake2 game null game facilities for this project.
miniquake2/game/base/spawn.ml as bspawn → src/miniquake2/game/base/spawn.mlminiquake2/game/constants.ml as gc → src/miniquake2/game/constants.mlminiquake2/game/gameplay/combat.ml as ngcombat → src/miniquake2/game/gameplay/combat.mlminiquake2/game/gameplay/constants.ml as nggpconstants → src/miniquake2/game/gameplay/constants.mlminiquake2/game/gameplay/item_rules.ml as nggpitems → src/miniquake2/game/gameplay/item_rules.mlminiquake2/game/gameplay/powerups.ml as ngpowerups → src/miniquake2/game/gameplay/powerups.mlminiquake2/game/gameplay/registry.ml as ngregistry → src/miniquake2/game/gameplay/registry.mlminiquake2/game/gameplay/types.ml as nggtypes → src/miniquake2/game/gameplay/types.mlminiquake2/game/integration/baseq2.ml as ngbaseq2 → src/miniquake2/game/integration/baseq2.mlminiquake2/game/persistence.ml as gpersist → src/miniquake2/game/persistence.mlminiquake2/game/player/client.ml as ngplayerclient → src/miniquake2/game/player/client.mlminiquake2/game/player/commands.ml as ngplayercommands → src/miniquake2/game/player/commands.mlminiquake2/game/player/constants.ml as ngplayerconstants → src/miniquake2/game/player/constants.mlminiquake2/game/player/effects.ml as ngplayereffects → src/miniquake2/game/player/effects.mlminiquake2/game/player/frame.ml as ngplayerframe → src/miniquake2/game/player/frame.mlminiquake2/game/player/spawn.ml as ngplayerspawn → src/miniquake2/game/player/spawn.mlminiquake2/game/player/types.ml as ngplayertypes → src/miniquake2/game/player/types.mlminiquake2/game/player/userinfo.ml as ngplayerinfo → src/miniquake2/game/player/userinfo.mlminiquake2/game/player/view.ml as ngplayerview → src/miniquake2/game/player/view.mlminiquake2/game/private_save.ml as ngprivatesave → src/miniquake2/game/private_save.mlminiquake2/game/types.ml as gt → src/miniquake2/game/types.mlminiquake2/game/weapons/constants.ml as ngweaponconstants → src/miniquake2/game/weapons/constants.mlminiquake2/qcommon/byteio.ml as ngbyteio → src/miniquake2/qcommon/byteio.mlminiquake2/qcommon/constants.ml as qc → src/miniquake2/qcommon/constants.mlminiquake2/qcommon/info.ml as nginfo → src/miniquake2/qcommon/info.mlminiquake2/qcommon/text.ml as ngtext → src/miniquake2/qcommon/text.mlminiquake2/qcommon/types.ml as ngqtypes → src/miniquake2/qcommon/types.mlminiquake2/server/administration.ml as ngserveradmin → src/miniquake2/server/administration.mlminiquake2/server/game_bridge.ml as nggamebridge → src/miniquake2/server/game_bridge.mlstd/math.ml as ngmath → ../MiniLangCompilerML/std/math.ml external dependencystd/string.ml as ngstring → ../MiniLangCompilerML/std/string.ml external dependencyactiveBaseRuntimeStores module-wide active base runtime state for the miniquake2 game null game module.
activeExportStores module-wide active export state for the miniquake2 game null game module.
activeImportsStores module-wide active imports state for the miniquake2 game null game module.
activeMaxClientsStores module-wide active max clients state for the miniquake2 game null game module.
activePlayerContextStores module-wide active player context state for the miniquake2 game null game module.
activePmoveContentMaskStores module-wide active pmove content mask state for the miniquake2 game null game module.
activePmovePassEntityStores module-wide active pmove pass entity state for the miniquake2 game null game module.
activeSkillStores module-wide active skill state for the miniquake2 game null game module.
function aiAreasConnected(first, second)Report whether ai areas connected.
| Parameter | Type | Default | Description |
|---|---|---|---|
first | dynamic | — | first value consumed by this operation. |
second | dynamic | — | second value consumed by this operation. |
function aiInPHS(first, second)Return the ai in phs value.
| Parameter | Type | Default | Description |
|---|---|---|---|
first | dynamic | — | first value consumed by this operation. |
second | dynamic | — | second value consumed by this operation. |
function aiTraceVisible(actor, other)Report whether ai trace visible.
| Parameter | Type | Default | Description |
|---|---|---|---|
actor | dynamic | — | actor value consumed by this operation. |
other | dynamic | — | other value consumed by this operation. |
function apiInstalled()Return the api installed value.
function baseEdicts()Return the base edicts value.
function baseRuntime()Return the base runtime value.
function baseWorldAreaPortal(style, isOpen)Return the base world area portal value.
| Parameter | Type | Default | Description |
|---|---|---|---|
style | dynamic | — | style value consumed by this operation. |
isOpen | dynamic | — | isOpen value consumed by this operation. |
function baseWorldBeginIntermission(entity, mapName)Begin base world intermission.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | entity value consumed by this operation. |
mapName | dynamic | — | mapName value consumed by this operation. |
function baseWorldCenter(entity, message)Return the base world center value.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | entity value consumed by this operation. |
message | dynamic | — | Human-readable message associated with the operation. |
function baseWorldChangeLevel(entity, other, activator, mapName)Return the base world change level value.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | entity value consumed by this operation. |
other | dynamic | — | other value consumed by this operation. |
activator | dynamic | — | activator value consumed by this operation. |
mapName | dynamic | — | mapName value consumed by this operation. |
function baseWorldLink(entity)Link base world.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | entity value consumed by this operation. |
function baseWorldLog(message)Return the base world log value.
| Parameter | Type | Default | Description |
|---|---|---|---|
message | dynamic | — | Human-readable message associated with the operation. |
function baseWorldSound(entity, soundName)Return the base world sound value.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | entity value consumed by this operation. |
soundName | dynamic | — | soundName value consumed by this operation. |
function baseWorldTargetExplosion(origin)Return the base world target explosion value.
| Parameter | Type | Default | Description |
|---|---|---|---|
origin | dynamic | — | origin value consumed by this operation. |
function baseWorldTargetSplash(origin, direction, count, sounds)Return the base world target splash value.
| Parameter | Type | Default | Description |
|---|---|---|---|
origin | dynamic | — | origin value consumed by this operation. |
direction | dynamic | — | direction value consumed by this operation. |
count | dynamic | — | Number of items or units to process. |
sounds | dynamic | — | sounds value consumed by this operation. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
exportTable | dynamic | — | exportTable value consumed by this operation. |
function chatFloodAllowed(slot, player, context)Return the chat flood allowed value.
| Parameter | Type | Default | Description |
|---|---|---|---|
slot | dynamic | — | slot value consumed by this operation. |
player | dynamic | — | player value consumed by this operation. |
context | dynamic | — | Context that carries state for the operation. |
function chatTeamName(player, dmFlags)Return the chat team name.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | player value consumed by this operation. |
dmFlags | dynamic | — | dmFlags value consumed by this operation. |
function cheatsAllowed(slot, context)Return the cheats allowed value.
| Parameter | Type | Default | Description |
|---|---|---|---|
slot | dynamic | — | slot value consumed by this operation. |
context | dynamic | — | Context that carries state for the operation. |
function checkedClientEdict(entity, operation)Return the checked client edict value.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | entity value consumed by this operation. |
operation | dynamic | — | operation value consumed by this operation. |
function ClientBegin(entity)Begin client.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | entity value consumed by this operation. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | entity value consumed by this operation. |
clientCommandCountStores module-wide client command count state for the miniquake2 game null game module.
function ClientConnect(entity, userInfo)Performs the ClientConnect operation for the miniquake2 game null game module.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | entity value consumed by this operation. |
userInfo | dynamic | — | userInfo value consumed by this operation. |
function ClientDisconnect(entity)Return the client disconnect value.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | entity value consumed by this operation. |
function ClientThink(entity, command)Run client.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | entity value consumed by this operation. |
command | dynamic | — | command value consumed by this operation. |
function ClientUserinfoChanged(entity, userInfo)Return the client userinfo changed value.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | entity value consumed by this operation. |
userInfo | dynamic | — | userInfo value consumed by this operation. |
function configuredGameSkill()Return the configured game skill value.
function configureIntegratedRuntime(runtime, playerContext)Configure integrated runtime.
| Parameter | Type | Default | Description |
|---|---|---|---|
runtime | dynamic | — | runtime value consumed by this operation. |
playerContext | dynamic | — | playerContext value consumed by this operation. |
function configureMaxClients(count)Configure max clients.
| Parameter | Type | Default | Description |
|---|---|---|---|
count | dynamic | — | Number of items or units to process. |
function configureSkill(skill)Configure skill.
| Parameter | Type | Default | Description |
|---|---|---|---|
skill | dynamic | — | skill value consumed by this operation. |
currentEntityStringStores module-wide current entity string state for the miniquake2 game null game module.
currentMapStores module-wide current map state for the miniquake2 game null game module.
currentSpawnPointStores module-wide current spawn point state for the miniquake2 game null game module.
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.
function edictAt(index)Return the edict for the requested position.
| Parameter | Type | Default | Description |
|---|---|---|---|
index | dynamic | — | Zero-based index of the affected item. |
function edictIndex(entity)Return the edict index.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | entity value consumed by this operation. |
function edictOffset(index)Return the edict offset.
| Parameter | Type | Default | Description |
|---|---|---|---|
index | dynamic | — | Zero-based index of the affected item. |
function executeItemDrop(slot, player, context, item)Execute item drop.
| Parameter | Type | Default | Description |
|---|---|---|---|
slot | dynamic | — | slot value consumed by this operation. |
player | dynamic | — | player value consumed by this operation. |
context | dynamic | — | Context that carries state for the operation. |
item | dynamic | — | item value consumed by this operation. |
function findPlayer(index)Find player.
| Parameter | Type | Default | Description |
|---|---|---|---|
index | dynamic | — | Zero-based index of the affected item. |
frameNumberStores module-wide frame number state for the miniquake2 game null game module.
function GetGameApi(imports)Return game api.
| Parameter | Type | Default | Description |
|---|---|---|---|
imports | dynamic | — | imports value consumed by this operation. |
function giveItems(player, context, arguments)Return the give items value.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | player value consumed by this operation. |
context | dynamic | — | Context that carries state for the operation. |
arguments | dynamic | — | arguments value consumed by this operation. |
function helpLayout(context)Return the help layout value.
| Parameter | Type | Default | Description |
|---|---|---|---|
context | dynamic | — | Context that carries state for the operation. |
function Init()Performs the Init operation for the miniquake2 game null game module.
initializedStores module-wide initialized state for the miniquake2 game null game module.
lastSpawnResultStores module-wide last spawn result state for the miniquake2 game null game module.
lastUserInfoStores module-wide last user info state for the miniquake2 game null game module.
function lifecycleSnapshot()Return the lifecycle snapshot value.
function linkManagedEdicts()Link managed edicts.
function makeEdicts(count)Create edicts.
| Parameter | Type | Default | Description |
|---|---|---|---|
count | dynamic | — | Number of items or units to process. |
mapLoadedStores module-wide map loaded state for the miniquake2 game null game module.
function normalizedChatBody(command, arguments, includeCommand)Return the normalized chat body value.
| Parameter | Type | Default | Description |
|---|---|---|---|
command | dynamic | — | command value consumed by this operation. |
arguments | dynamic | — | arguments value consumed by this operation. |
includeCommand | dynamic | — | includeCommand value consumed by this operation. |
function onSameChatTeam(first, second, dmFlags)Report whether on same chat team.
| Parameter | Type | Default | Description |
|---|---|---|---|
first | dynamic | — | first value consumed by this operation. |
second | dynamic | — | second value consumed by this operation. |
dmFlags | dynamic | — | dmFlags value consumed by this operation. |
function playerContext()Return the player context value.
function playerCopyBody(player)Copy the dead client into BaseQ2's fixed eight-entry body queue.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | player value consumed by this operation. |
function playerDamage(context, player, amount, damageFlags, meansOfDeath)Return the player damage value.
| Parameter | Type | Default | Description |
|---|---|---|---|
context | dynamic | — | Context that carries state for the operation. |
player | dynamic | — | player value consumed by this operation. |
amount | dynamic | — | amount value consumed by this operation. |
damageFlags | dynamic | — | damageFlags value consumed by this operation. |
meansOfDeath | dynamic | — | meansOfDeath value consumed by this operation. |
function playerForEdict(slot, operation, createIfMissing)Return the player for edict value.
| Parameter | Type | Default | Description |
|---|---|---|---|
slot | dynamic | — | slot value consumed by this operation. |
operation | dynamic | — | operation value consumed by this operation. |
createIfMissing | dynamic | — | createIfMissing value consumed by this operation. |
function playerListText(context)Return the player list text value.
| Parameter | Type | Default | Description |
|---|---|---|---|
context | dynamic | — | Context that carries state for the operation. |
function playerPmoveTrace(start, mins, maxs, finish)Trace player pmove.
| Parameter | Type | Default | Description |
|---|---|---|---|
start | dynamic | — | start value consumed by this operation. |
mins | dynamic | — | mins value consumed by this operation. |
maxs | dynamic | — | maxs value consumed by this operation. |
finish | dynamic | — | finish value consumed by this operation. |
function playersText(context)Return the players text value.
| Parameter | Type | Default | Description |
|---|---|---|---|
context | dynamic | — | Context that carries state for the operation. |
function playerTouchEntity(entity, player)Handle player entity.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | entity value consumed by this operation. |
player | dynamic | — | player value consumed by this operation. |
function playerTouchTriggers(player)Handle player triggers.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | player value consumed by this operation. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
exportTable | dynamic | — | exportTable value consumed by this operation. |
capturedCount | dynamic | — | Number of captured to process. |
function ReadGame(filename)Read game.
| Parameter | Type | Default | Description |
|---|---|---|---|
filename | dynamic | — | filename value consumed by this operation. |
function ReadLevel(filename)Read level.
| Parameter | Type | Default | Description |
|---|---|---|---|
filename | dynamic | — | filename value consumed by this operation. |
function requireFunction(value, name)Require function.
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed or transformed by the operation. |
name | dynamic | — | Name of the affected item. |
function requireInitialized(operation)Require initialized.
| Parameter | Type | Default | Description |
|---|---|---|---|
operation | dynamic | — | operation value consumed by this operation. |
function requireInstalled(operation)Require installed.
| Parameter | Type | Default | Description |
|---|---|---|---|
operation | dynamic | — | operation value consumed by this operation. |
function restoreManagedImage(image)Restore managed image.
| Parameter | Type | Default | Description |
|---|---|---|---|
image | dynamic | — | image value consumed by this operation. |
function RunFrame()Run frame.
runFrameEdictScratchG_RunFrame snapshots every edict origin before gameplay. Keep both the value
runFrameOriginScratchStores module-wide run frame origin scratch state for the miniquake2 game null game module.
function runtimeEdict(number)Return the runtime edict value.
| Parameter | Type | Default | Description |
|---|---|---|---|
number | dynamic | — | number value consumed by this operation. |
function scoreboardLayout(context)p_hud.c DeathmatchScoreboardMessage, retaining its score order, 12-client display bound and Protocol-34 "client" layout command.
| Parameter | Type | Default | Description |
|---|---|---|---|
context | dynamic | — | Context that carries state for the operation. |
function sendChat(slot, player, context, team, includeCommand, command)Send chat.
| Parameter | Type | Default | Description |
|---|---|---|---|
slot | dynamic | — | slot value consumed by this operation. |
player | dynamic | — | player value consumed by this operation. |
context | dynamic | — | Context that carries state for the operation. |
team | dynamic | — | team value consumed by this operation. |
includeCommand | dynamic | — | includeCommand value consumed by this operation. |
command | dynamic | — | command value consumed by this operation. |
function sendInventory(slot, player)Send inventory.
| Parameter | Type | Default | Description |
|---|---|---|---|
slot | dynamic | — | slot value consumed by this operation. |
player | dynamic | — | player value consumed by this operation. |
function sendLayout(slot, layout)Send layout.
| Parameter | Type | Default | Description |
|---|---|---|---|
slot | dynamic | — | slot value consumed by this operation. |
layout | dynamic | — | layout value consumed by this operation. |
function sendScoreboard(slot, context)Send scoreboard.
| Parameter | Type | Default | Description |
|---|---|---|---|
slot | dynamic | — | slot value consumed by this operation. |
context | dynamic | — | Context that carries state for the operation. |
function ServerCommand()Return the server command value.
serverCommandCountStores module-wide server command count state for the miniquake2 game null game module.
function Shutdown()Performs the Shutdown operation for the miniquake2 game null game module.
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
spawnedBaseEdictsStores module-wide spawned base edicts state for the miniquake2 game null game module.
function SpawnEntities(mapName, entityString, spawnPoint)Spawn entities.
| Parameter | Type | Default | Description |
|---|---|---|---|
mapName | dynamic | — | mapName value consumed by this operation. |
entityString | dynamic | — | entityString value consumed by this operation. |
spawnPoint | dynamic | — | spawnPoint value consumed by this operation. |
function spawnResult()Spawn result.
stockLightStylesStores module-wide stock light styles state for the miniquake2 game null game module.
function validateGameImport(imports)Validate game import.
| Parameter | Type | Default | Description |
|---|---|---|---|
imports | dynamic | — | imports value consumed by this operation. |
function WriteGame(filename, autosave)Write game.
| Parameter | Type | Default | Description |
|---|---|---|---|
filename | dynamic | — | filename value consumed by this operation. |
autosave | dynamic | — | autosave value consumed by this operation. |
function WriteLevel(filename)Write level.
| Parameter | Type | Default | Description |
|---|---|---|---|
filename | dynamic | — | filename value consumed by this operation. |