Files
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.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
type | dynamic | — | type value consumed by this operation. |
position | dynamic | — | position value consumed by this operation. |
direction | dynamic | — | direction value consumed by this operation. |
View source
# emitPlayerMuzzleSounds
function emitPlayerMuzzleSounds(state, entityNumber, weapon, volume)
Emit player muzzle sounds.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
entityNumber | dynamic | — | entityNumber value consumed by this operation. |
weapon | dynamic | — | weapon value consumed by this operation. |
volume | dynamic | — | volume value consumed by this operation. |
View source
# entityAngles
function entityAngles(entityState)
Return the entity angles.
| Parameter | Type | Default | Description |
|---|
entityState | dynamic | — | entityState value consumed by this operation. |
View source
# entityOrigin
function entityOrigin(entityState)
Return the entity origin.
| Parameter | Type | Default | Description |
|---|
entityState | dynamic | — | entityState value consumed by this operation. |
View source
# handleEntityEvent
function handleEntityEvent(state, entityState)
Handle entity event.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
entityState | dynamic | — | entityState value consumed by this operation. |
View source
# impactAngles
function impactAngles(direction)
Return the impact angles.
| Parameter | Type | Default | Description |
|---|
direction | dynamic | — | direction value consumed by this operation. |
View source
# indexedSound
function indexedSound(state, position, entity, channel, index, volume, attenuation, offset)
Return the indexed sound value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
position | dynamic | — | position value consumed by this operation. |
entity | dynamic | — | entity value consumed by this operation. |
channel | dynamic | — | channel value consumed by this operation. |
index | dynamic | — | Zero-based index of the affected item. |
volume | dynamic | — | volume value consumed by this operation. |
attenuation | dynamic | — | attenuation value consumed by this operation. |
offset | dynamic | — | Zero-based offset at which processing starts. |
View source
# machineGunSound
function machineGunSound(state)
Return the machine gun sound value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
View source
# monsterGreenBlaster
inline function monsterGreenBlaster(flash)
Return the monster green blaster value.
| Parameter | Type | Default | Description |
|---|
flash | dynamic | — | flash value consumed by this operation. |
View source
# monsterMachineGun
inline function monsterMachineGun(flash)
Return the monster machine gun value.
| Parameter | Type | Default | Description |
|---|
flash | dynamic | — | flash value consumed by this operation. |
View source
# monsterMuzzleColor
function monsterMuzzleColor(flash)
Return the monster muzzle color value.
| Parameter | Type | Default | Description |
|---|
flash | dynamic | — | flash value consumed by this operation. |
View source
# monsterMuzzleSound
function monsterMuzzleSound(state, flash)
Return the monster muzzle sound value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
flash | dynamic | — | flash value consumed by this operation. |
View source
# monsterPlasmaBeam
inline function monsterPlasmaBeam(flash)
Return the monster plasma beam value.
| Parameter | Type | Default | Description |
|---|
flash | dynamic | — | flash value consumed by this operation. |
View source
# monsterRail
inline function monsterRail(flash)
Return the monster rail value.
| Parameter | Type | Default | Description |
|---|
flash | dynamic | — | flash value consumed by this operation. |
View source
# monsterRocket
inline function monsterRocket(flash)
Return the monster rocket value.
| Parameter | Type | Default | Description |
|---|
flash | dynamic | — | flash value consumed by this operation. |
View source
# namedSound
function namedSound(state, position, entity, channel, name, volume, attenuation, offset)
Return the named sound value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
position | dynamic | — | position value consumed by this operation. |
entity | dynamic | — | entity value consumed by this operation. |
channel | dynamic | — | channel value consumed by this operation. |
name | dynamic | — | Name of the affected item. |
volume | dynamic | — | volume value consumed by this operation. |
attenuation | dynamic | — | attenuation value consumed by this operation. |
offset | dynamic | — | Zero-based offset at which processing starts. |
View source
# parseBeam
function parseBeam(state, buffer, modelName, withOffset, playerLinked)
Parse normal beam.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
modelName | dynamic | — | modelName value consumed by this operation. |
withOffset | dynamic | — | withOffset value consumed by this operation. |
playerLinked | dynamic | — | playerLinked value consumed by this operation. |
View source
# parseLightning
function parseLightning(state, buffer)
Parse lightning.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
View source
# parseMuzzleFlash
function parseMuzzleFlash(state, buffer, entityResolver)
Parse muzzle flash.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
entityResolver | dynamic | — | entityResolver value consumed by this operation. |
View source
# parseMuzzleFlash2
function parseMuzzleFlash2(state, buffer, entityResolver)
Parse muzzle flash 2.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
entityResolver | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
modelName | dynamic | — | modelName value consumed by this operation. |
localEntityNumber | dynamic | — | localEntityNumber value consumed by this operation. |
View source
# parseServiceCommand
function parseServiceCommand(state, buffer, opcode, entityResolver, localEntityNumber)
Parse service command.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
opcode | dynamic | — | opcode value consumed by this operation. |
entityResolver | dynamic | — | entityResolver value consumed by this operation. |
localEntityNumber | dynamic | — | localEntityNumber value consumed by this operation. |
View source
# parseSound
function parseSound(state, buffer)
Parse sound.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
View source
# parseSteam
function parseSteam(state, buffer)
Parse steam.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
buffer | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
buffer | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
localEntityNumber | dynamic | — | localEntityNumber value consumed by this operation. |
View source
# playerMuzzleColor
function playerMuzzleColor(weapon)
Return the player muzzle color value.
| Parameter | Type | Default | Description |
|---|
weapon | dynamic | — | weapon value consumed by this operation. |
View source
# playerMuzzleSound
function playerMuzzleSound(weapon)
Return the player muzzle sound value.
| Parameter | Type | Default | Description |
|---|
weapon | dynamic | — | weapon value consumed by this operation. |
View source
# polyExplosion
function polyExplosion(state, type, position)
Return the poly explosion value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
type | dynamic | — | type value consumed by this operation. |
position | dynamic | — | position value consumed by this operation. |
View source
# readDirection
function readDirection(buffer, operation)
Read direction.
| Parameter | Type | Default | Description |
|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
operation | dynamic | — | operation value consumed by this operation. |
View source
# readPosition
function readPosition(buffer, operation)
Read position.
| Parameter | Type | Default | Description |
|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
operation | dynamic | — | operation value consumed by this operation. |
View source
# smokeAndFlash
function smokeAndFlash(state, position)
Return the smoke and flash value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
position | dynamic | — | position value consumed by this operation. |
View source
# soldierBlaster
inline function soldierBlaster(flash)
Return the soldier blaster value.
| Parameter | Type | Default | Description |
|---|
flash | dynamic | — | flash value consumed by this operation. |
View source
# soldierMachineGun
inline function soldierMachineGun(flash)
Return the soldier machine gun value.
| Parameter | Type | Default | Description |
|---|
flash | dynamic | — | flash value consumed by this operation. |
View source
# soldierShotgun
inline function soldierShotgun(flash)
Return the soldier shotgun value.
| Parameter | Type | Default | Description |
|---|
flash | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
splash | dynamic | — | splash value consumed by this operation. |
View source
# tankMachineGunSound
function tankMachineGunSound(state)
Return the tank machine gun sound value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
View source