MiniQuake2

src/miniquake2/client/effects/parser.ml

Provides miniquake2 client effects parser facilities for this project.

Package
miniquake2.client.effects.parser
Reachable
Yes

Imports

Declarations

blasterExplosion

function blasterExplosion(state, type, position, direction)

Return the blaster explosion value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
typedynamic—type value consumed by this operation.
positiondynamic—position value consumed by this operation.
directiondynamic—direction value consumed by this operation.

View source

emitPlayerMuzzleSounds

function emitPlayerMuzzleSounds(state, entityNumber, weapon, volume)

Emit player muzzle sounds.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
entityNumberdynamic—entityNumber value consumed by this operation.
weapondynamic—weapon value consumed by this operation.
volumedynamic—volume value consumed by this operation.

View source

entityAngles

function entityAngles(entityState)

Return the entity angles.

ParameterTypeDefaultDescription
entityStatedynamic—entityState value consumed by this operation.

View source

entityOrigin

function entityOrigin(entityState)

Return the entity origin.

ParameterTypeDefaultDescription
entityStatedynamic—entityState value consumed by this operation.

View source

handleEntityEvent

function handleEntityEvent(state, entityState)

Handle entity event.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
entityStatedynamic—entityState value consumed by this operation.

View source

impactAngles

function impactAngles(direction)

Return the impact angles.

ParameterTypeDefaultDescription
directiondynamic—direction value consumed by this operation.

View source

indexedSound

function indexedSound(state, position, entity, channel, index, volume, attenuation, offset)

Return the indexed sound value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
positiondynamic—position value consumed by this operation.
entitydynamic—entity value consumed by this operation.
channeldynamic—channel value consumed by this operation.
indexdynamic—Zero-based index of the affected item.
volumedynamic—volume value consumed by this operation.
attenuationdynamic—attenuation value consumed by this operation.
offsetdynamic—Zero-based offset at which processing starts.

View source

machineGunSound

function machineGunSound(state)

Return the machine gun sound value.

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

View source

monsterGreenBlaster

inline function monsterGreenBlaster(flash)

Return the monster green blaster value.

ParameterTypeDefaultDescription
flashdynamic—flash value consumed by this operation.

View source

monsterMachineGun

inline function monsterMachineGun(flash)

Return the monster machine gun value.

ParameterTypeDefaultDescription
flashdynamic—flash value consumed by this operation.

View source

monsterMuzzleColor

function monsterMuzzleColor(flash)

Return the monster muzzle color value.

ParameterTypeDefaultDescription
flashdynamic—flash value consumed by this operation.

View source

monsterMuzzleSound

function monsterMuzzleSound(state, flash)

Return the monster muzzle sound value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
flashdynamic—flash value consumed by this operation.

View source

monsterPlasmaBeam

inline function monsterPlasmaBeam(flash)

Return the monster plasma beam value.

ParameterTypeDefaultDescription
flashdynamic—flash value consumed by this operation.

View source

monsterRail

inline function monsterRail(flash)

Return the monster rail value.

ParameterTypeDefaultDescription
flashdynamic—flash value consumed by this operation.

View source

monsterRocket

inline function monsterRocket(flash)

Return the monster rocket value.

ParameterTypeDefaultDescription
flashdynamic—flash value consumed by this operation.

View source

namedSound

function namedSound(state, position, entity, channel, name, volume, attenuation, offset)

Return the named sound value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
positiondynamic—position value consumed by this operation.
entitydynamic—entity value consumed by this operation.
channeldynamic—channel value consumed by this operation.
namedynamic—Name of the affected item.
volumedynamic—volume value consumed by this operation.
attenuationdynamic—attenuation value consumed by this operation.
offsetdynamic—Zero-based offset at which processing starts.

View source

parseBeam

function parseBeam(state, buffer, modelName, withOffset, playerLinked)

Parse normal beam.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
bufferdynamic—Buffer that receives or supplies the operation data.
modelNamedynamic—modelName value consumed by this operation.
withOffsetdynamic—withOffset value consumed by this operation.
playerLinkeddynamic—playerLinked value consumed by this operation.

View source

parseLightning

function parseLightning(state, buffer)

Parse lightning.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
bufferdynamic—Buffer that receives or supplies the operation data.

View source

parseMuzzleFlash

function parseMuzzleFlash(state, buffer, entityResolver)

Parse muzzle flash.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
bufferdynamic—Buffer that receives or supplies the operation data.
entityResolverdynamic—entityResolver value consumed by this operation.

View source

parseMuzzleFlash2

function parseMuzzleFlash2(state, buffer, entityResolver)

Parse muzzle flash 2.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
bufferdynamic—Buffer that receives or supplies the operation data.
entityResolverdynamic—entityResolver value consumed by this operation.

View source

parsePlayerBeam

function parsePlayerBeam(state, buffer, modelName, localEntityNumber)

Parse Rogue heat/player beam. The dedicated player-beam pool is selected for every source entity, while only the local entity is anchored to the camera.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
bufferdynamic—Buffer that receives or supplies the operation data.
modelNamedynamic—modelName value consumed by this operation.
localEntityNumberdynamic—localEntityNumber value consumed by this operation.

View source

parseServiceCommand

function parseServiceCommand(state, buffer, opcode, entityResolver, localEntityNumber)

Parse service command.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
bufferdynamic—Buffer that receives or supplies the operation data.
opcodedynamic—opcode value consumed by this operation.
entityResolverdynamic—entityResolver value consumed by this operation.
localEntityNumberdynamic—localEntityNumber value consumed by this operation.

View source

parseSound

function parseSound(state, buffer)

Parse sound.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
bufferdynamic—Buffer that receives or supplies the operation data.

View source

parseSteam

function parseSteam(state, buffer)

Parse steam.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
bufferdynamic—Buffer that receives or supplies the operation data.

View source

parseTempEntity

function parseTempEntity(state, buffer)

Compatibility entry point for parser unit tests without a connected client.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
bufferdynamic—Buffer that receives or supplies the operation data.

View source

parseTempEntityForPlayer

function parseTempEntityForPlayer(state, buffer, localEntityNumber)

Decode one svc_temp_entity payload and immediately publish its bounded client-side representation. Each branch consumes exactly the bytes defined by the original CL_ParseTEnt switch so the next server command stays aligned.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
bufferdynamic—Buffer that receives or supplies the operation data.
localEntityNumberdynamic—localEntityNumber value consumed by this operation.

View source

playerMuzzleColor

function playerMuzzleColor(weapon)

Return the player muzzle color value.

ParameterTypeDefaultDescription
weapondynamic—weapon value consumed by this operation.

View source

playerMuzzleSound

function playerMuzzleSound(weapon)

Return the player muzzle sound value.

ParameterTypeDefaultDescription
weapondynamic—weapon value consumed by this operation.

View source

polyExplosion

function polyExplosion(state, type, position)

Return the poly explosion value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
typedynamic—type value consumed by this operation.
positiondynamic—position value consumed by this operation.

View source

readDirection

function readDirection(buffer, operation)

Read direction.

ParameterTypeDefaultDescription
bufferdynamic—Buffer that receives or supplies the operation data.
operationdynamic—operation value consumed by this operation.

View source

readPosition

function readPosition(buffer, operation)

Read position.

ParameterTypeDefaultDescription
bufferdynamic—Buffer that receives or supplies the operation data.
operationdynamic—operation value consumed by this operation.

View source

smokeAndFlash

function smokeAndFlash(state, position)

Return the smoke and flash value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
positiondynamic—position value consumed by this operation.

View source

soldierBlaster

inline function soldierBlaster(flash)

Return the soldier blaster value.

ParameterTypeDefaultDescription
flashdynamic—flash value consumed by this operation.

View source

soldierMachineGun

inline function soldierMachineGun(flash)

Return the soldier machine gun value.

ParameterTypeDefaultDescription
flashdynamic—flash value consumed by this operation.

View source

soldierShotgun

inline function soldierShotgun(flash)

Return the soldier shotgun value.

ParameterTypeDefaultDescription
flashdynamic—flash value consumed by this operation.

View source

SOUND_FLAG_MASK

const SOUND_FLAG_MASK = 31

Defines the sound flag mask constant used by the miniquake2 client effects parser module.

View source

splashColor

inline function splashColor(splash)

Return the splash color value.

ParameterTypeDefaultDescription
splashdynamic—splash value consumed by this operation.

View source

tankMachineGunSound

function tankMachineGunSound(state)

Return the tank machine gun sound value.

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

View source