Files
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.
| Parameter | Type | Default | Description |
|---|
first | dynamic | — | first value consumed by this operation. |
second | dynamic | — | second value consumed by this operation. |
View source
# addBeam
function addBeam(state, entity, destinationEntity, modelName, start, finish, offset, playerLinked, duration)
Add normal beam.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
entity | dynamic | — | entity value consumed by this operation. |
destinationEntity | dynamic | — | destinationEntity value consumed by this operation. |
modelName | dynamic | — | modelName value consumed by this operation. |
start | dynamic | — | start value consumed by this operation. |
finish | dynamic | — | finish value consumed by this operation. |
offset | dynamic | — | Zero-based offset at which processing starts. |
playerLinked | dynamic | — | playerLinked value consumed by this operation. |
duration | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
entity | dynamic | — | entity value consumed by this operation. |
destinationEntity | dynamic | — | destinationEntity value consumed by this operation. |
modelName | dynamic | — | modelName value consumed by this operation. |
start | dynamic | — | start value consumed by this operation. |
finish | dynamic | — | finish value consumed by this operation. |
offset | dynamic | — | Zero-based offset at which processing starts. |
playerLinked | dynamic | — | playerLinked value consumed by this operation. |
duration | dynamic | — | duration value consumed by this operation. |
playerPool | dynamic | — | playerPool value consumed by this operation. |
View source
# addDLight
function addDLight(state, key, origin, radius, color, duration, decay)
Add d light.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
key | dynamic | — | key value consumed by this operation. |
origin | dynamic | — | origin value consumed by this operation. |
radius | dynamic | — | radius value consumed by this operation. |
color | dynamic | — | color value consumed by this operation. |
duration | dynamic | — | duration value consumed by this operation. |
decay | dynamic | — | decay value consumed by this operation. |
View source
# addExplosion
function addExplosion(state, kind, origin, modelName, frames, light, lightColor, flags, alpha)
Add explosion.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
kind | dynamic | — | kind value consumed by this operation. |
origin | dynamic | — | origin value consumed by this operation. |
modelName | dynamic | — | modelName value consumed by this operation. |
frames | dynamic | — | frames value consumed by this operation. |
light | dynamic | — | light value consumed by this operation. |
lightColor | dynamic | — | lightColor value consumed by this operation. |
flags | dynamic | — | Bit flags controlling the operation. |
alpha | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
kind | dynamic | — | kind value consumed by this operation. |
origin | dynamic | — | origin value consumed by this operation. |
angles | dynamic | — | angles value consumed by this operation. |
modelName | dynamic | — | modelName value consumed by this operation. |
frames | dynamic | — | frames value consumed by this operation. |
light | dynamic | — | light value consumed by this operation. |
lightColor | dynamic | — | lightColor value consumed by this operation. |
startTime | dynamic | — | startTime value consumed by this operation. |
baseFrame | dynamic | — | baseFrame value consumed by this operation. |
flags | dynamic | — | Bit flags controlling the operation. |
alpha | dynamic | — | alpha value consumed by this operation. |
skinNum | dynamic | — | skinNum value consumed by this operation. |
View source
# addLaser
function addLaser(state, start, finish, color)
Add laser.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
start | dynamic | — | start value consumed by this operation. |
finish | dynamic | — | finish value consumed by this operation. |
color | dynamic | — | color value consumed by this operation. |
View source
# addParticle
function addParticle(state, origin, velocity, acceleration, color, alpha, alphaVelocity)
Add particle.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
origin | dynamic | — | origin value consumed by this operation. |
velocity | dynamic | — | velocity value consumed by this operation. |
acceleration | dynamic | — | acceleration value consumed by this operation. |
color | dynamic | — | color value consumed by this operation. |
alpha | dynamic | — | alpha value consumed by this operation. |
alphaVelocity | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
entity | dynamic | — | entity value consumed by this operation. |
modelName | dynamic | — | modelName value consumed by this operation. |
start | dynamic | — | start value consumed by this operation. |
finish | dynamic | — | finish value consumed by this operation. |
offset | dynamic | — | Zero-based offset at which processing starts. |
playerLinked | dynamic | — | playerLinked value consumed by this operation. |
duration | dynamic | — | duration value consumed by this operation. |
View source
# advance
function advance(state, now)
Performs the advance operation for the miniquake2 client effects state module.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
now | dynamic | — | now value consumed by this operation. |
View source
# allocateDLight
function allocateDLight(state, key)
Allocate d light.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
key | dynamic | — | key value consumed by this operation. |
View source
# bfgParticles
function bfgParticles(state, origin)
Return the bfg particles value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
origin | dynamic | — | origin value consumed by this operation. |
View source
# bigTeleportParticles
function bigTeleportParticles(state, origin)
Return the big teleport particles value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
origin | dynamic | — | origin value consumed by this operation. |
View source
# blasterParticles
function blasterParticles(state, origin, direction, color)
Return the blaster particles value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
origin | dynamic | — | origin value consumed by this operation. |
direction | dynamic | — | direction value consumed by this operation. |
color | dynamic | — | color value consumed by this operation. |
View source
# blasterTrail
function blasterTrail(state, startPosition, endPosition, green)
Return the blaster trail value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
startPosition | dynamic | — | startPosition value consumed by this operation. |
endPosition | dynamic | — | endPosition value consumed by this operation. |
green | dynamic | — | green value consumed by this operation. |
View source
# bubbleTrail
function bubbleTrail(state, startPosition, endPosition, spacing, rise)
Return the bubble trail value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
startPosition | dynamic | — | startPosition value consumed by this operation. |
endPosition | dynamic | — | endPosition value consumed by this operation. |
spacing | dynamic | — | spacing value consumed by this operation. |
rise | dynamic | — | rise value consumed by this operation. |
View source
# centeredRandom
inline function centeredRandom(state)
Return the centered random value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
View source
# clear
function clear(state)
Clear state.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
View source
# compact
function compact(values, count)
Return the compact value.
| Parameter | Type | Default | Description |
|---|
values | dynamic | — | values value consumed by this operation. |
count | dynamic | — | Number of items or units to process. |
View source
# copyVec
inline function copyVec(value)
Copy vec data.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed or transformed by the operation. |
View source
# create
function create(audioCallbacks, randomSeed)
Creates create for the miniquake2 client effects state module.
| Parameter | Type | Default | Description |
|---|
audioCallbacks | dynamic | — | audioCallbacks value consumed by this operation. |
randomSeed | dynamic | — | randomSeed value consumed by this operation. |
View source
# createSilent
function createSilent(randomSeed)
Report whether create silent.
| Parameter | Type | Default | Description |
|---|
randomSeed | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
first | dynamic | — | first value consumed by this operation. |
second | dynamic | — | second value consumed by this operation. |
View source
# debugTrail
function debugTrail(state, startPosition, endPosition)
Return the debug trail value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
startPosition | dynamic | — | startPosition value consumed by this operation. |
endPosition | dynamic | — | endPosition value consumed by this operation. |
View source
# diminishingTrail
function diminishingTrail(state, startPosition, endPosition, trail, flags)
Return the diminishing trail value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
startPosition | dynamic | — | startPosition value consumed by this operation. |
endPosition | dynamic | — | endPosition value consumed by this operation. |
trail | dynamic | — | trail value consumed by this operation. |
flags | dynamic | — | Bit flags controlling the operation. |
View source
# ensureAngularVelocities
function ensureAngularVelocities(state)
Ensure angular velocities.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
View source
# explosionParticles
function explosionParticles(state, origin, color, colorRun, count, velocityRange)
Return the explosion particles value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
origin | dynamic | — | origin value consumed by this operation. |
color | dynamic | — | color value consumed by this operation. |
colorRun | dynamic | — | colorRun value consumed by this operation. |
count | dynamic | — | Number of items or units to process. |
velocityRange | dynamic | — | velocityRange value consumed by this operation. |
View source
# fixedColorParticles
function fixedColorParticles(state, origin, direction, color, count, positiveGravity)
Return the fixed color particles value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
origin | dynamic | — | origin value consumed by this operation. |
direction | dynamic | — | direction value consumed by this operation. |
color | dynamic | — | color value consumed by this operation. |
count | dynamic | — | Number of items or units to process. |
positiveGravity | dynamic | — | positiveGravity value consumed by this operation. |
View source
# flagTrail
function flagTrail(state, startPosition, endPosition, color, inclusive)
Return the flag trail value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
startPosition | dynamic | — | startPosition value consumed by this operation. |
endPosition | dynamic | — | endPosition value consumed by this operation. |
color | dynamic | — | color value consumed by this operation. |
inclusive | dynamic | — | inclusive value consumed by this operation. |
View source
# flyEffect
function flyEffect(state, trail, origin)
Return the fly effect value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
trail | dynamic | — | trail value consumed by this operation. |
origin | dynamic | — | origin value consumed by this operation. |
View source
# flyParticles
function flyParticles(state, origin, count)
Return the fly particles value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
origin | dynamic | — | origin value consumed by this operation. |
count | dynamic | — | Number of items or units to process. |
View source
# forceWallParticles
function forceWallParticles(state, startPosition, endPosition, color)
Return the force wall particles value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
startPosition | dynamic | — | startPosition value consumed by this operation. |
endPosition | dynamic | — | endPosition value consumed by this operation. |
color | dynamic | — | color value consumed by this operation. |
View source
# instantShellParticles
function instantShellParticles(state, origin, color, count, radius)
Return the instant shell particles value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
origin | dynamic | — | origin value consumed by this operation. |
color | dynamic | — | color value consumed by this operation. |
count | dynamic | — | Number of items or units to process. |
radius | dynamic | — | radius value consumed by this operation. |
View source
# ionRipperTrail
function ionRipperTrail(state, startPosition, endPosition)
Return the ion ripper trail value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
startPosition | dynamic | — | startPosition value consumed by this operation. |
endPosition | dynamic | — | endPosition value consumed by this operation. |
View source
# itemRespawnParticles
function itemRespawnParticles(state, origin)
Return the item respawn particles value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
origin | dynamic | — | origin value consumed by this operation. |
View source
# logoutParticles
function logoutParticles(state, origin, color)
Return the logout particles value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
origin | dynamic | — | origin value consumed by this operation. |
color | dynamic | — | color value consumed by this operation. |
View source
# normalized
inline function normalized(value)
Performs the normalized operation for the miniquake2 client effects state module.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed or transformed by the operation. |
View source
# normalRight
inline function normalRight(forward)
Return the normal right value.
| Parameter | Type | Default | Description |
|---|
forward | dynamic | — | forward value consumed by this operation. |
View source
# railTrail
function railTrail(state, startPosition, endPosition)
Return the rail trail value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
startPosition | dynamic | — | startPosition value consumed by this operation. |
endPosition | dynamic | — | endPosition value consumed by this operation. |
View source
# random
inline function random(state)
Return the random value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
View source
# reserveParticles
function reserveParticles(state, requested)
Reserve particles.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
requested | dynamic | — | requested value consumed by this operation. |
View source
# resetEntityTrails
function resetEntityTrails(state)
Reset entity trails.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
View source
# rocketTrail
function rocketTrail(state, startPosition, endPosition, trail)
Return the rocket trail value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
startPosition | dynamic | — | startPosition value consumed by this operation. |
endPosition | dynamic | — | endPosition value consumed by this operation. |
trail | dynamic | — | trail value consumed by this operation. |
View source
# scaled
inline function scaled(value, amount)
Return the scaled value.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed or transformed by the operation. |
amount | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
startPosition | dynamic | — | startPosition value consumed by this operation. |
endPosition | dynamic | — | endPosition value consumed by this operation. |
color | dynamic | — | color value consumed by this operation. |
originSpread | dynamic | — | originSpread value consumed by this operation. |
velocitySpread | dynamic | — | velocitySpread value consumed by this operation. |
alpha | dynamic | — | alpha value consumed by this operation. |
alphaBase | dynamic | — | alphaBase value consumed by this operation. |
alphaRange | dynamic | — | alphaRange value consumed by this operation. |
inclusive | dynamic | — | inclusive value consumed by this operation. |
View source
# steamParticles
function steamParticles(state, origin, direction, color, count, magnitude, noGravity)
Return the steam particles value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
origin | dynamic | — | origin value consumed by this operation. |
direction | dynamic | — | direction value consumed by this operation. |
color | dynamic | — | color value consumed by this operation. |
count | dynamic | — | Number of items or units to process. |
magnitude | dynamic | — | magnitude value consumed by this operation. |
noGravity | dynamic | — | noGravity value consumed by this operation. |
View source
# stockDirectionalParticles
function stockDirectionalParticles(state, origin, direction, color, count, fixedColor, positiveGravity)
Return the stock directional particles value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
origin | dynamic | — | origin value consumed by this operation. |
direction | dynamic | — | direction value consumed by this operation. |
color | dynamic | — | color value consumed by this operation. |
count | dynamic | — | Number of items or units to process. |
fixedColor | dynamic | — | fixedColor value consumed by this operation. |
positiveGravity | dynamic | — | positiveGravity value consumed by this operation. |
View source
# sustainRadialParticles
function sustainRadialParticles(state, sustain, now, nuke)
Return the sustain radial particles value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
sustain | dynamic | — | sustain value consumed by this operation. |
now | dynamic | — | now value consumed by this operation. |
nuke | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
origin | dynamic | — | origin value consumed by this operation. |
View source
# teleportParticles
function teleportParticles(state, origin)
Return the teleport particles value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
origin | dynamic | — | origin value consumed by this operation. |
View source
# trackerTrail
function trackerTrail(state, startPosition, endPosition, color)
Return the tracker trail value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
startPosition | dynamic | — | startPosition value consumed by this operation. |
endPosition | dynamic | — | endPosition value consumed by this operation. |
color | dynamic | — | color value consumed by this operation. |
View source
# trapParticles
function trapParticles(state, shiftedOrigin)
Return the trap particles value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
shiftedOrigin | dynamic | — | shiftedOrigin value consumed by this operation. |
View source
# unitRandom
inline function unitRandom(state)
Return the unit random value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
View source
# vecFromArray
function vecFromArray(value)
Return the vec from array.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed or transformed by the operation. |
View source
# vectorLength
inline function vectorLength(value)
Return the vector length.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed or transformed by the operation. |
View source
# wallParticles
function wallParticles(state, origin, direction, color, count)
Return the wall particles value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
origin | dynamic | — | origin value consumed by this operation. |
direction | dynamic | — | direction value consumed by this operation. |
color | dynamic | — | color value consumed by this operation. |
count | dynamic | — | Number of items or units to process. |
View source
# widowSplashParticles
function widowSplashParticles(state, origin)
Return the widow splash particles value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
origin | dynamic | — | origin value consumed by this operation. |
View source