MiniQuake

src/miniquake/world.ml

Package
miniquake.world
Reachable
No

Imports

Declarations

absolute

function absolute(value)

Implements the `absolute` operation for `miniquake.world` (absolute).

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `absolute`.

View source

AREA_DEPTH

const AREA_DEPTH = 4

Defines the area depth value used by `miniquake.world`.

View source

AREA_NODES

const AREA_NODES = 32

Defines the area nodes value used by `miniquake.world`.

View source

miniquake.world.AreaNode struct

boxesOverlap

function boxesOverlap(minsA, maxsA, minsB, maxsB)

Implements the `boxesOverlap` operation for `miniquake.world` (boxes overlap).

ParameterTypeDefaultDescription
minsAdynamic—The mins a input consumed by `boxesOverlap`.
maxsAdynamic—The maxs a input consumed by `boxesOverlap`.
minsBdynamic—The mins b input consumed by `boxesOverlap`.
maxsBdynamic—The maxs b input consumed by `boxesOverlap`.

View source

boxPlane

function boxPlane(state, planeIndex)

Implements the `boxPlane` operation for `miniquake.world` (box plane).

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.world` state used by `boxPlane`.
planeIndexdynamic—Zero-based index of the requested entry.

View source

chooseTrace

function chooseTrace(best, candidate)

Implements the `chooseTrace` operation for `miniquake.world` (choose trace).

ParameterTypeDefaultDescription
bestdynamic—The best input consumed by `chooseTrace`.
candidatedynamic—The candidate input consumed by `chooseTrace`.

View source

entityHasTouch

function entityHasTouch(state, entityIndex)

Implements the `entityHasTouch` operation for `miniquake.world` (entity has touch).

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.world` state used by `entityHasTouch`.
entityIndexdynamic—Zero-based index of the requested entry.

View source

entityModel

function entityModel(state, entityIndex)

Implements the `entityModel` operation for `miniquake.world` (entity model).

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.world` state used by `entityModel`.
entityIndexdynamic—Zero-based index of the requested entry.

View source

entityNumber

function entityNumber(state, entityIndex, name, fallback)

Return entity number derived from the active module state.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.world` state used by `entityNumber`.
entityIndexdynamic—Zero-based index of the requested entry.
namedynamic—Stable name that identifies the requested object or option.
fallbackdynamic—Value to use when the requested input is unavailable or invalid.

View source

entityValid

function entityValid(state, entityIndex)

Report whether entity valid holds for the active state.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.world` state used by `entityValid`.
entityIndexdynamic—Zero-based index of the requested entry.

View source

entityVector

function entityVector(state, entityIndex, name)

Implements the `entityVector` operation for `miniquake.world` (entity vector).

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.world` state used by `entityVector`.
entityIndexdynamic—Zero-based index of the requested entry.
namedynamic—Stable name that identifies the requested object or option.

View source

executeTrigger

function executeTrigger(state, triggerIndex, entityIndex)

Execute trigger.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.world` state used by `executeTrigger`.
triggerIndexdynamic—Zero-based index of the requested entry.
entityIndexdynamic—Zero-based index of the requested entry.

View source

fallbackEdict

function fallbackEdict(state, entityIndex)

Implements the `fallbackEdict` operation for `miniquake.world` (fallback edict).

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.world` state used by `fallbackEdict`.
entityIndexdynamic—Zero-based index of the requested entry.

View source

hasRuntime

inline function hasRuntime(state)

Report whether runtime.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.world` state used by `hasRuntime`.

View source

hullIndex

function hullIndex(mins, maxs)

Return hull index derived from the active module state.

ParameterTypeDefaultDescription
minsdynamic—The mins input consumed by `hullIndex`.
maxsdynamic—The maxs input consumed by `hullIndex`.

View source

makeState

function makeState(server, map)

Creates state for `miniquake.world`.

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

View source

MAX_ENT_LEAFS

const MAX_ENT_LEAFS = 16

Defines the max ent leafs value used by `miniquake.world`.

View source

miniquake.world.MoveClip struct

removeEntity

function removeEntity(values, entityIndex)

Release state for remove entity.

ParameterTypeDefaultDescription
valuesdynamic—The values input consumed by `removeEntity`.
entityIndexdynamic—Zero-based index of the requested entry.

View source

rotatedBounds

function rotatedBounds(origin, mins, maxs)

Implements the `rotatedBounds` operation for `miniquake.world` (rotated bounds).

ParameterTypeDefaultDescription
origindynamic—World-space origin of the operation.
minsdynamic—The mins input consumed by `rotatedBounds`.
maxsdynamic—The maxs input consumed by `rotatedBounds`.

View source

rotateFromModel

function rotateFromModel(value, angles)

Implements the `rotateFromModel` operation for `miniquake.world` (rotate from model).

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `rotateFromModel`.
anglesdynamic—Orientation angles used by the operation.

View source

rotateIntoModel

function rotateIntoModel(value, angles)

Implements the `rotateIntoModel` operation for `miniquake.world` (rotate into model).

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `rotateIntoModel`.
anglesdynamic—Orientation angles used by the operation.

View source

SV_BoxOnPlaneSide

function SV_BoxOnPlaneSide(mins, maxs, plane)

Apply the Quake-compatible sv box on plane side behavior.

ParameterTypeDefaultDescription
minsdynamic—The mins input consumed by `SV_BoxOnPlaneSide`.
maxsdynamic—The maxs input consumed by `SV_BoxOnPlaneSide`.
planedynamic—The plane input consumed by `SV_BoxOnPlaneSide`.

View source

SV_BspHullPointContents

function SV_BspHullPointContents(hull, number, point)

Apply the Quake-compatible sv bsp hull point contents behavior.

ParameterTypeDefaultDescription
hulldynamic—The hull input consumed by `SV_BspHullPointContents`.
numberdynamic—The number input consumed by `SV_BspHullPointContents`.
pointdynamic—The point input consumed by `SV_BspHullPointContents`.

View source

SV_ClearWorld

function SV_ClearWorld(server, map)

Apply the Quake-compatible sv clear world behavior.

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

View source

SV_ClipMoveToEntity

function SV_ClipMoveToEntity(state, entityIndex, start, mins, maxs, finish)

Apply the Quake-compatible sv clip move to entity behavior.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.world` state used by `SV_ClipMoveToEntity`.
entityIndexdynamic—Zero-based index of the requested entry.
startdynamic—The start input consumed by `SV_ClipMoveToEntity`.
minsdynamic—The mins input consumed by `SV_ClipMoveToEntity`.
maxsdynamic—The maxs input consumed by `SV_ClipMoveToEntity`.
finishdynamic—The finish input consumed by `SV_ClipMoveToEntity`.

View source

SV_CreateAreaNode

function SV_CreateAreaNode(state, depth, mins, maxs)

Apply the Quake-compatible sv create area node behavior.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.world` state used by `SV_CreateAreaNode`.
depthdynamic—The depth input consumed by `SV_CreateAreaNode`.
minsdynamic—The mins input consumed by `SV_CreateAreaNode`.
maxsdynamic—The maxs input consumed by `SV_CreateAreaNode`.

View source

SV_FindTouchedLeafs

function SV_FindTouchedLeafs(state, entityIndex, nodeNumber)

Apply the Quake-compatible sv find touched leafs behavior.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.world` state used by `SV_FindTouchedLeafs`.
entityIndexdynamic—Zero-based index of the requested entry.
nodeNumberdynamic—The node number input consumed by `SV_FindTouchedLeafs`.

View source

SV_HullForBox

function SV_HullForBox(mins, maxs)

Apply the Quake-compatible sv hull for box behavior.

ParameterTypeDefaultDescription
minsdynamic—The mins input consumed by `SV_HullForBox`.
maxsdynamic—The maxs input consumed by `SV_HullForBox`.

View source

SV_HullForEntity

function SV_HullForEntity(state, entityIndex, mins, maxs)

Apply the Quake-compatible sv hull for entity behavior.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.world` state used by `SV_HullForEntity`.
entityIndexdynamic—Zero-based index of the requested entry.
minsdynamic—The mins input consumed by `SV_HullForEntity`.
maxsdynamic—The maxs input consumed by `SV_HullForEntity`.

View source

SV_HullPointContents

function SV_HullPointContents(hull, number, point)

Apply the Quake-compatible sv hull point contents behavior.

ParameterTypeDefaultDescription
hulldynamic—The hull input consumed by `SV_HullPointContents`.
numberdynamic—The number input consumed by `SV_HullPointContents`.
pointdynamic—The point input consumed by `SV_HullPointContents`.

View source

SV_InitBoxHull

function SV_InitBoxHull()

Apply the Quake-compatible sv init box hull behavior.

View source

SV_LinkEdict

function SV_LinkEdict(state, entityIndex, touchTriggers)

Apply the Quake-compatible sv link edict behavior.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.world` state used by `SV_LinkEdict`.
entityIndexdynamic—Zero-based index of the requested entry.
touchTriggersdynamic—The touch triggers input consumed by `SV_LinkEdict`.

View source

SV_Move

function SV_Move(state, start, mins, maxs, finish, moveType, passedEntity)

Apply the Quake-compatible sv move behavior.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.world` state used by `SV_Move`.
startdynamic—The start input consumed by `SV_Move`.
minsdynamic—The mins input consumed by `SV_Move`.
maxsdynamic—The maxs input consumed by `SV_Move`.
finishdynamic—The finish input consumed by `SV_Move`.
moveTypedynamic—The move type input consumed by `SV_Move`.
passedEntitydynamic—The passed entity input consumed by `SV_Move`.

View source

SV_MoveBounds

function SV_MoveBounds(start, mins, maxs, finish)

Apply the Quake-compatible sv move bounds behavior.

ParameterTypeDefaultDescription
startdynamic—The start input consumed by `SV_MoveBounds`.
minsdynamic—The mins input consumed by `SV_MoveBounds`.
maxsdynamic—The maxs input consumed by `SV_MoveBounds`.
finishdynamic—The finish input consumed by `SV_MoveBounds`.

View source

SV_PointContents

function SV_PointContents(state, point)

Apply the Quake-compatible sv point contents behavior.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.world` state used by `SV_PointContents`.
pointdynamic—The point input consumed by `SV_PointContents`.

View source

SV_RecursiveHullCheck

function SV_RecursiveHullCheck(hull, number, p1Fraction, p2Fraction, p1, p2, trace)

Apply the Quake-compatible sv recursive hull check behavior.

ParameterTypeDefaultDescription
hulldynamic—The hull input consumed by `SV_RecursiveHullCheck`.
numberdynamic—The number input consumed by `SV_RecursiveHullCheck`.
p1Fractiondynamic—The p1 fraction input consumed by `SV_RecursiveHullCheck`.
p2Fractiondynamic—The p2 fraction input consumed by `SV_RecursiveHullCheck`.
p1dynamic—The p1 input consumed by `SV_RecursiveHullCheck`.
p2dynamic—The p2 input consumed by `SV_RecursiveHullCheck`.
tracedynamic—The trace input consumed by `SV_RecursiveHullCheck`.

View source

SV_TestEntityPosition

function SV_TestEntityPosition(state, entityIndex)

Apply the Quake-compatible sv test entity position behavior.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.world` state used by `SV_TestEntityPosition`.
entityIndexdynamic—Zero-based index of the requested entry.

View source

SV_TruePointContents

function SV_TruePointContents(state, point)

Apply the Quake-compatible sv true point contents behavior.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.world` state used by `SV_TruePointContents`.
pointdynamic—The point input consumed by `SV_TruePointContents`.

View source

SV_UnlinkEdict

function SV_UnlinkEdict(state, entityIndex)

Apply the Quake-compatible sv unlink edict behavior.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.world` state used by `SV_UnlinkEdict`.
entityIndexdynamic—Zero-based index of the requested entry.

View source

World_SetTouchEnabled

function World_SetTouchEnabled(state, entityIndex, enabled)

Report whether world set touch enabled holds for the active state.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.world` state used by `World_SetTouchEnabled`.
entityIndexdynamic—Zero-based index of the requested entry.
enableddynamic—Whether the optional behavior is enabled.

View source

miniquake.world.WorldAreaState struct

zeroVector

function zeroVector()

Implements the `zeroVector` operation for `miniquake.world` (zero vector).

View source