MiniQuake2

src/miniquake2/client/effects/state.ml

Provides miniquake2 client effects state facilities for this project.

Package
miniquake2.client.effects.state
Reachable
Yes

Imports

Declarations

add

inline function add(first, second)

Adds add to the state managed by the miniquake2 client effects state module.

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

View source

addBeam

function addBeam(state, entity, destinationEntity, modelName, start, finish, offset, playerLinked, duration)

Add normal beam.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
entitydynamic—entity value consumed by this operation.
destinationEntitydynamic—destinationEntity value consumed by this operation.
modelNamedynamic—modelName value consumed by this operation.
startdynamic—start value consumed by this operation.
finishdynamic—finish value consumed by this operation.
offsetdynamic—Zero-based offset at which processing starts.
playerLinkeddynamic—playerLinked value consumed by this operation.
durationdynamic—duration value consumed by this operation.

View source

addBeamToPool

function addBeamToPool(state, entity, destinationEntity, modelName, start, finish, offset, playerLinked, duration, playerPool)

Add a beam to the stock normal-beam or player-beam pool.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
entitydynamic—entity value consumed by this operation.
destinationEntitydynamic—destinationEntity value consumed by this operation.
modelNamedynamic—modelName value consumed by this operation.
startdynamic—start value consumed by this operation.
finishdynamic—finish value consumed by this operation.
offsetdynamic—Zero-based offset at which processing starts.
playerLinkeddynamic—playerLinked value consumed by this operation.
durationdynamic—duration value consumed by this operation.
playerPooldynamic—playerPool value consumed by this operation.

View source

addDLight

function addDLight(state, key, origin, radius, color, duration, decay)

Add d light.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
keydynamic—key value consumed by this operation.
origindynamic—origin value consumed by this operation.
radiusdynamic—radius value consumed by this operation.
colordynamic—color value consumed by this operation.
durationdynamic—duration value consumed by this operation.
decaydynamic—decay value consumed by this operation.

View source

addExplosion

function addExplosion(state, kind, origin, modelName, frames, light, lightColor, flags, alpha)

Add explosion.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
kinddynamic—kind value consumed by this operation.
origindynamic—origin value consumed by this operation.
modelNamedynamic—modelName value consumed by this operation.
framesdynamic—frames value consumed by this operation.
lightdynamic—light value consumed by this operation.
lightColordynamic—lightColor value consumed by this operation.
flagsdynamic—Bit flags controlling the operation.
alphadynamic—alpha value consumed by this operation.

View source

addExplosionExact

function addExplosionExact(state, kind, origin, angles, modelName, frames, light, lightColor, startTime, baseFrame, flags, alpha, skinNum)

Add explosion exact.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
kinddynamic—kind value consumed by this operation.
origindynamic—origin value consumed by this operation.
anglesdynamic—angles value consumed by this operation.
modelNamedynamic—modelName value consumed by this operation.
framesdynamic—frames value consumed by this operation.
lightdynamic—light value consumed by this operation.
lightColordynamic—lightColor value consumed by this operation.
startTimedynamic—startTime value consumed by this operation.
baseFramedynamic—baseFrame value consumed by this operation.
flagsdynamic—Bit flags controlling the operation.
alphadynamic—alpha value consumed by this operation.
skinNumdynamic—skinNum value consumed by this operation.

View source

addLaser

function addLaser(state, start, finish, color)

Add laser.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
startdynamic—start value consumed by this operation.
finishdynamic—finish value consumed by this operation.
colordynamic—color value consumed by this operation.

View source

addParticle

function addParticle(state, origin, velocity, acceleration, color, alpha, alphaVelocity)

Add particle.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
origindynamic—origin value consumed by this operation.
velocitydynamic—velocity value consumed by this operation.
accelerationdynamic—acceleration value consumed by this operation.
colordynamic—color value consumed by this operation.
alphadynamic—alpha value consumed by this operation.
alphaVelocitydynamic—alphaVelocity value consumed by this operation.

View source

addPlayerBeam

function addPlayerBeam(state, entity, modelName, start, finish, offset, playerLinked, duration)

Add Rogue player beam. Remote players still use this separate reuse pool; playerLinked only controls whether the local camera supplies its origin.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
entitydynamic—entity value consumed by this operation.
modelNamedynamic—modelName value consumed by this operation.
startdynamic—start value consumed by this operation.
finishdynamic—finish value consumed by this operation.
offsetdynamic—Zero-based offset at which processing starts.
playerLinkeddynamic—playerLinked value consumed by this operation.
durationdynamic—duration value consumed by this operation.

View source

advance

function advance(state, now)

Performs the advance operation for the miniquake2 client effects state module.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
nowdynamic—now value consumed by this operation.

View source

allocateDLight

function allocateDLight(state, key)

Allocate d light.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
keydynamic—key value consumed by this operation.

View source

bfgParticles

function bfgParticles(state, origin)

Return the bfg particles value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
origindynamic—origin value consumed by this operation.

View source

bigTeleportParticles

function bigTeleportParticles(state, origin)

Return the big teleport particles value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
origindynamic—origin value consumed by this operation.

View source

blasterParticles

function blasterParticles(state, origin, direction, color)

Return the blaster particles value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
origindynamic—origin value consumed by this operation.
directiondynamic—direction value consumed by this operation.
colordynamic—color value consumed by this operation.

View source

blasterTrail

function blasterTrail(state, startPosition, endPosition, green)

Return the blaster trail value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
startPositiondynamic—startPosition value consumed by this operation.
endPositiondynamic—endPosition value consumed by this operation.
greendynamic—green value consumed by this operation.

View source

bubbleTrail

function bubbleTrail(state, startPosition, endPosition, spacing, rise)

Return the bubble trail value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
startPositiondynamic—startPosition value consumed by this operation.
endPositiondynamic—endPosition value consumed by this operation.
spacingdynamic—spacing value consumed by this operation.
risedynamic—rise value consumed by this operation.

View source

centeredRandom

inline function centeredRandom(state)

Return the centered random value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.

View source

clear

function clear(state)

Clear state.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.

View source

compact

function compact(values, count)

Return the compact value.

ParameterTypeDefaultDescription
valuesdynamic—values value consumed by this operation.
countdynamic—Number of items or units to process.

View source

copyVec

inline function copyVec(value)

Copy vec data.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

create

function create(audioCallbacks, randomSeed)

Creates create for the miniquake2 client effects state module.

ParameterTypeDefaultDescription
audioCallbacksdynamic—audioCallbacks value consumed by this operation.
randomSeeddynamic—randomSeed value consumed by this operation.

View source

createSilent

function createSilent(randomSeed)

Report whether create silent.

ParameterTypeDefaultDescription
randomSeeddynamic—randomSeed value consumed by this operation.

View source

cross

inline function cross(first, second)

Performs the cross operation for the miniquake2 client effects state module.

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

View source

debugTrail

function debugTrail(state, startPosition, endPosition)

Return the debug trail value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
startPositiondynamic—startPosition value consumed by this operation.
endPositiondynamic—endPosition value consumed by this operation.

View source

diminishingTrail

function diminishingTrail(state, startPosition, endPosition, trail, flags)

Return the diminishing trail value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
startPositiondynamic—startPosition value consumed by this operation.
endPositiondynamic—endPosition value consumed by this operation.
traildynamic—trail value consumed by this operation.
flagsdynamic—Bit flags controlling the operation.

View source

ensureAngularVelocities

function ensureAngularVelocities(state)

Ensure angular velocities.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.

View source

explosionParticles

function explosionParticles(state, origin, color, colorRun, count, velocityRange)

Return the explosion particles value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
origindynamic—origin value consumed by this operation.
colordynamic—color value consumed by this operation.
colorRundynamic—colorRun value consumed by this operation.
countdynamic—Number of items or units to process.
velocityRangedynamic—velocityRange value consumed by this operation.

View source

fixedColorParticles

function fixedColorParticles(state, origin, direction, color, count, positiveGravity)

Return the fixed color particles value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
origindynamic—origin value consumed by this operation.
directiondynamic—direction value consumed by this operation.
colordynamic—color value consumed by this operation.
countdynamic—Number of items or units to process.
positiveGravitydynamic—positiveGravity value consumed by this operation.

View source

flagTrail

function flagTrail(state, startPosition, endPosition, color, inclusive)

Return the flag trail value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
startPositiondynamic—startPosition value consumed by this operation.
endPositiondynamic—endPosition value consumed by this operation.
colordynamic—color value consumed by this operation.
inclusivedynamic—inclusive value consumed by this operation.

View source

flyEffect

function flyEffect(state, trail, origin)

Return the fly effect value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
traildynamic—trail value consumed by this operation.
origindynamic—origin value consumed by this operation.

View source

flyParticles

function flyParticles(state, origin, count)

Return the fly particles value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
origindynamic—origin value consumed by this operation.
countdynamic—Number of items or units to process.

View source

forceWallParticles

function forceWallParticles(state, startPosition, endPosition, color)

Return the force wall particles value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
startPositiondynamic—startPosition value consumed by this operation.
endPositiondynamic—endPosition value consumed by this operation.
colordynamic—color value consumed by this operation.

View source

instantShellParticles

function instantShellParticles(state, origin, color, count, radius)

Return the instant shell particles value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
origindynamic—origin value consumed by this operation.
colordynamic—color value consumed by this operation.
countdynamic—Number of items or units to process.
radiusdynamic—radius value consumed by this operation.

View source

ionRipperTrail

function ionRipperTrail(state, startPosition, endPosition)

Return the ion ripper trail value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
startPositiondynamic—startPosition value consumed by this operation.
endPositiondynamic—endPosition value consumed by this operation.

View source

itemRespawnParticles

function itemRespawnParticles(state, origin)

Return the item respawn particles value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
origindynamic—origin value consumed by this operation.

View source

logoutParticles

function logoutParticles(state, origin, color)

Return the logout particles value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
origindynamic—origin value consumed by this operation.
colordynamic—color value consumed by this operation.

View source

normalized

inline function normalized(value)

Performs the normalized operation for the miniquake2 client effects state module.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

normalRight

inline function normalRight(forward)

Return the normal right value.

ParameterTypeDefaultDescription
forwarddynamic—forward value consumed by this operation.

View source

railTrail

function railTrail(state, startPosition, endPosition)

Return the rail trail value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
startPositiondynamic—startPosition value consumed by this operation.
endPositiondynamic—endPosition value consumed by this operation.

View source

random

inline function random(state)

Return the random value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.

View source

reserveParticles

function reserveParticles(state, requested)

Reserve particles.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
requesteddynamic—requested value consumed by this operation.

View source

resetEntityTrails

function resetEntityTrails(state)

Reset entity trails.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.

View source

rocketTrail

function rocketTrail(state, startPosition, endPosition, trail)

Return the rocket trail value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
startPositiondynamic—startPosition value consumed by this operation.
endPositiondynamic—endPosition value consumed by this operation.
traildynamic—trail value consumed by this operation.

View source

scaled

inline function scaled(value, amount)

Return the scaled value.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.
amountdynamic—amount value consumed by this operation.

View source

simpleEntityTrail

function simpleEntityTrail(state, startPosition, endPosition, color, originSpread, velocitySpread, alpha, alphaBase, alphaRange, inclusive)

Return the simple entity trail value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
startPositiondynamic—startPosition value consumed by this operation.
endPositiondynamic—endPosition value consumed by this operation.
colordynamic—color value consumed by this operation.
originSpreaddynamic—originSpread value consumed by this operation.
velocitySpreaddynamic—velocitySpread value consumed by this operation.
alphadynamic—alpha value consumed by this operation.
alphaBasedynamic—alphaBase value consumed by this operation.
alphaRangedynamic—alphaRange value consumed by this operation.
inclusivedynamic—inclusive value consumed by this operation.

View source

steamParticles

function steamParticles(state, origin, direction, color, count, magnitude, noGravity)

Return the steam particles value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
origindynamic—origin value consumed by this operation.
directiondynamic—direction value consumed by this operation.
colordynamic—color value consumed by this operation.
countdynamic—Number of items or units to process.
magnitudedynamic—magnitude value consumed by this operation.
noGravitydynamic—noGravity value consumed by this operation.

View source

stockDirectionalParticles

function stockDirectionalParticles(state, origin, direction, color, count, fixedColor, positiveGravity)

Return the stock directional particles value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
origindynamic—origin value consumed by this operation.
directiondynamic—direction value consumed by this operation.
colordynamic—color value consumed by this operation.
countdynamic—Number of items or units to process.
fixedColordynamic—fixedColor value consumed by this operation.
positiveGravitydynamic—positiveGravity value consumed by this operation.

View source

sustainRadialParticles

function sustainRadialParticles(state, sustain, now, nuke)

Return the sustain radial particles value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
sustaindynamic—sustain value consumed by this operation.
nowdynamic—now value consumed by this operation.
nukedynamic—nuke value consumed by this operation.

View source

teleporterEntityParticles

function teleporterEntityParticles(state, origin)

EF_TELEPORTER is a persistent entity flag fired once for every accepted server frame. It is deliberately separate from the 1,053-particle player teleport event above.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
origindynamic—origin value consumed by this operation.

View source

teleportParticles

function teleportParticles(state, origin)

Return the teleport particles value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
origindynamic—origin value consumed by this operation.

View source

trackerTrail

function trackerTrail(state, startPosition, endPosition, color)

Return the tracker trail value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
startPositiondynamic—startPosition value consumed by this operation.
endPositiondynamic—endPosition value consumed by this operation.
colordynamic—color value consumed by this operation.

View source

trapParticles

function trapParticles(state, shiftedOrigin)

Return the trap particles value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
shiftedOrigindynamic—shiftedOrigin value consumed by this operation.

View source

unitRandom

inline function unitRandom(state)

Return the unit random value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.

View source

vecFromArray

function vecFromArray(value)

Return the vec from array.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

vectorLength

inline function vectorLength(value)

Return the vector length.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

wallParticles

function wallParticles(state, origin, direction, color, count)

Return the wall particles value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
origindynamic—origin value consumed by this operation.
directiondynamic—direction value consumed by this operation.
colordynamic—color value consumed by this operation.
countdynamic—Number of items or units to process.

View source

widowSplashParticles

function widowSplashParticles(state, origin)

Return the widow splash particles value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
origindynamic—origin value consumed by this operation.

View source