MiniQuake

src/miniquake/temp_entities.ml

Package
miniquake.temp_entities
Reachable
Yes

Imports

Declarations

allocateTempDlight

function allocateTempDlight(state, currentTime)

Allocate and initialize temp dlight.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.temp_entities` state used by `allocateTempDlight`.
currentTimedynamic—Time value used by the operation.

View source

appendExplosionLight

function appendExplosionLight(state, origin, currentTime)

Add state for append explosion light.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.temp_entities` state used by `appendExplosionLight`.
origindynamic—World-space origin of the operation.
currentTimedynamic—Time value used by the operation.

View source

appendParticleEvent

function appendParticleEvent(state, name, origin, color, count, extra)

Add state for append particle event.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.temp_entities` state used by `appendParticleEvent`.
namedynamic—Stable name that identifies the requested object or option.
origindynamic—World-space origin of the operation.
colordynamic—Color value used by the operation.
countdynamic—Number of entries or units to process.
extradynamic—The extra input consumed by `appendParticleEvent`.

View source

appendSoundEvent

function appendSoundEvent(state, name, origin)

Add state for append sound event.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.temp_entities` state used by `appendSoundEvent`.
namedynamic—Stable name that identifies the requested object or option.
origindynamic—World-space origin of the operation.

View source

appendSpikeSound

function appendSpikeSound(state, origin)

Add state for append spike sound.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.temp_entities` state used by `appendSpikeSound`.
origindynamic—World-space origin of the operation.

View source

appendUnique

function appendUnique(values, value)

Add state for append unique.

ParameterTypeDefaultDescription
valuesdynamic—The values input consumed by `appendUnique`.
valuedynamic—Value consumed by `appendUnique`.

View source

beamModelForType

function beamModelForType(type)

Return beam model for type derived from the active module state.

ParameterTypeDefaultDescription
typedynamic—The type input consumed by `beamModelForType`.

View source

beamTypeForModel

function beamTypeForModel(model)

Implements the `beamTypeForModel` operation for `miniquake.temp_entities` (beam type for model).

ParameterTypeDefaultDescription
modeldynamic—Model resource processed by the operation.

View source

CL_InitTEnts

function CL_InitTEnts(mixer)

Apply the Quake-compatible cl init tents behavior.

ParameterTypeDefaultDescription
mixerdynamic—The mixer input consumed by `CL_InitTEnts`.

View source

CL_NewTempEntity

function CL_NewTempEntity(state)

Apply the Quake-compatible cl new temp entity behavior.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.temp_entities` state used by `CL_NewTempEntity`.

View source

CL_ParseBeam

function CL_ParseBeam(state, reader, model, currentTime)

Apply the Quake-compatible cl parse beam behavior.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.temp_entities` state used by `CL_ParseBeam`.
readerdynamic—The reader input consumed by `CL_ParseBeam`.
modeldynamic—Model resource processed by the operation.
currentTimedynamic—Time value used by the operation.

View source

CL_ParseTEnt

function CL_ParseTEnt(state, reader, currentTime)

Apply the Quake-compatible cl parse tent behavior.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.temp_entities` state used by `CL_ParseTEnt`.
readerdynamic—The reader input consumed by `CL_ParseTEnt`.
currentTimedynamic—Time value used by the operation.

View source

CL_Rand

function CL_Rand(state)

Apply the Quake-compatible cl rand behavior.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.temp_entities` state used by `CL_Rand`.

View source

CL_SetRandomSeed

function CL_SetRandomSeed(state, seed)

Apply the Quake-compatible cl set random seed behavior.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.temp_entities` state used by `CL_SetRandomSeed`.
seeddynamic—The seed input consumed by `CL_SetRandomSeed`.

View source

CL_UpdateTEnts

function CL_UpdateTEnts(state, currentTime, viewEntity, viewOrigin)

Apply the Quake-compatible cl update tents behavior.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.temp_entities` state used by `CL_UpdateTEnts`.
currentTimedynamic—Time value used by the operation.
viewEntitydynamic—The view entity input consumed by `CL_UpdateTEnts`.
viewOrigindynamic—The view origin input consumed by `CL_UpdateTEnts`.

View source

emptyBeam

function emptyBeam()

Implements the `emptyBeam` operation for `miniquake.temp_entities` (empty beam).

View source

emptyDynamicLight

function emptyDynamicLight()

Implements the `emptyDynamicLight` operation for `miniquake.temp_entities` (empty dynamic light).

View source

MAX_BEAMS

const MAX_BEAMS = 24

Defines the max beams value used by `miniquake.temp_entities`.

View source

parse

function parse(reader)

Implements the `parse` operation for `miniquake.temp_entities` (parse).

ParameterTypeDefaultDescription
readerdynamic—The reader input consumed by `parse`.

View source

parseType

function parseType(reader, type)

Mirrors CL_ParseTEnt's wire consumption. Keeping this in the protocol layer is important: treating svc_temp_entity as a one-byte payload desynchronizes every command that follows it in the same server message.

ParameterTypeDefaultDescription
readerdynamic—The reader input consumed by `parseType`.
typedynamic—The type input consumed by `parseType`.

View source

readPosition

function readPosition(reader)

Read and validate position.

ParameterTypeDefaultDescription
readerdynamic—The reader input consumed by `readPosition`.

View source

setBeam

function setBeam(beam, entity, model, start, finish, currentTime)

Update module state for beam.

ParameterTypeDefaultDescription
beamdynamic—The beam input consumed by `setBeam`.
entitydynamic—Entity affected by the operation.
modeldynamic—Model resource processed by the operation.
startdynamic—The start input consumed by `setBeam`.
finishdynamic—The finish input consumed by `setBeam`.
currentTimedynamic—Time value used by the operation.

View source

miniquake.temp_entities.TempBeam struct

miniquake.temp_entities.TempEntityState struct

miniquake.temp_entities.TempRenderEntity struct