MiniQuake2

src/miniquake2/game/weapons/core.ml

Provides miniquake2 game weapons core facilities for this project.

Package
miniquake2.game.weapons.core
Reachable
Yes

Imports

Declarations

addTargetOrigin

function addTargetOrigin(target)

Add target origin.

ParameterTypeDefaultDescription
targetdynamic—target value consumed by this operation.

View source

advance

function advance(context, seconds)

Performs the advance operation for the miniquake2 game weapons core module.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
secondsdynamic—seconds value consumed by this operation.

View source

alwaysCanDamage

function alwaysCanDamage(target, origin)

Report whether always can damage.

ParameterTypeDefaultDescription
targetdynamic—target value consumed by this operation.
origindynamic—origin value consumed by this operation.

View source

applyDamage

function applyDamage(context, target, inflictor, attacker, direction, point, damage, knockback, flags, meansOfDeath)

Apply damage.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
targetdynamic—target value consumed by this operation.
inflictordynamic—inflictor value consumed by this operation.
attackerdynamic—attacker value consumed by this operation.
directiondynamic—direction value consumed by this operation.
pointdynamic—point value consumed by this operation.
damagedynamic—damage value consumed by this operation.
knockbackdynamic—knockback value consumed by this operation.
flagsdynamic—Bit flags controlling the operation.
meansOfDeathdynamic—meansOfDeath value consumed by this operation.

View source

clearTrace

function clearTrace(start, mins, maxs, endPosition, ignore, mask)

Clear trace.

ParameterTypeDefaultDescription
startdynamic—start value consumed by this operation.
minsdynamic—mins value consumed by this operation.
maxsdynamic—maxs value consumed by this operation.
endPositiondynamic—endPosition value consumed by this operation.
ignoredynamic—ignore value consumed by this operation.
maskdynamic—mask value consumed by this operation.

View source

combatDamage

function combatDamage(target, request)

Return the combat damage value.

ParameterTypeDefaultDescription
targetdynamic—target value consumed by this operation.
requestdynamic—request value consumed by this operation.

View source

createContext

function createContext(callbacks)

Create context.

ParameterTypeDefaultDescription
callbacksdynamic—callbacks value consumed by this operation.

View source

damageAttackerNumber

function damageAttackerNumber()

Return the damage attacker number.

View source

defaultCallbacks

function defaultCallbacks()

Return the default callbacks value.

View source

emitEffect

function emitEffect(context, kind, start, endPosition, normal, style, count)

Emit effect.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
kinddynamic—kind value consumed by this operation.
startdynamic—start value consumed by this operation.
endPositiondynamic—endPosition value consumed by this operation.
normaldynamic—normal value consumed by this operation.
styledynamic—style value consumed by this operation.
countdynamic—Number of items or units to process.

View source

emptyContents

function emptyContents(point)

Report whether empty contents.

ParameterTypeDefaultDescription
pointdynamic—point value consumed by this operation.

View source

freeProjectile

function freeProjectile(context, projectile)

Release projectile.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
projectiledynamic—projectile value consumed by this operation.

View source

freeThink

function freeThink(projectile, context)

Release think.

ParameterTypeDefaultDescription
projectiledynamic—projectile value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

MAX_WEAPON_EVENT_HISTORY

const MAX_WEAPON_EVENT_HISTORY = 1024

Defines the max weapon event history constant used by the miniquake2 game weapons core module.

View source

noDodge

function noDodge(owner, start, direction, speed)

Report whether no dodge.

ParameterTypeDefaultDescription
ownerdynamic—owner value consumed by this operation.
startdynamic—start value consumed by this operation.
directiondynamic—direction value consumed by this operation.
speeddynamic—speed value consumed by this operation.

View source

noEffect

function noEffect(effect)

Report whether no effect.

ParameterTypeDefaultDescription
effectdynamic—effect value consumed by this operation.

View source

noFree

function noFree(entity)

Report whether no free.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.

View source

noNoise

function noNoise(owner, position, noiseType)

Report whether no noise.

ParameterTypeDefaultDescription
ownerdynamic—owner value consumed by this operation.
positiondynamic—position value consumed by this operation.
noiseTypedynamic—noiseType value consumed by this operation.

View source

noRadiusTargets

function noRadiusTargets(origin, radius)

Report whether no radius targets.

ParameterTypeDefaultDescription
origindynamic—origin value consumed by this operation.
radiusdynamic—radius value consumed by this operation.

View source

noSound

function noSound(entity, soundName)

Report whether no sound.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
soundNamedynamic—soundName value consumed by this operation.

View source

radiusDamage

function radiusDamage(context, inflictor, attacker, baseDamage, ignore, radius, meansOfDeath)

Return the radius damage value.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
inflictordynamic—inflictor value consumed by this operation.
attackerdynamic—attacker value consumed by this operation.
baseDamagedynamic—baseDamage value consumed by this operation.
ignoredynamic—ignore value consumed by this operation.
radiusdynamic—radius value consumed by this operation.
meansOfDeathdynamic—meansOfDeath value consumed by this operation.

View source

runDueThinks

function runDueThinks(context)

Run due thinks.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.

View source

spawnProjectile

function spawnProjectile(context, className)

Spawn projectile.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
classNamedynamic—className value consumed by this operation.

View source

surfaceIsSky

function surfaceIsSky(trace)

Report whether surface is sky.

ParameterTypeDefaultDescription
tracedynamic—trace value consumed by this operation.

View source

touchProjectile

function touchProjectile(context, projectile, other, trace)

Handle projectile.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
projectiledynamic—projectile value consumed by this operation.
otherdynamic—other value consumed by this operation.
tracedynamic—trace value consumed by this operation.

View source

weaponCoreAppendEvent

function weaponCoreAppendEvent(context, value)

Append weapon core event.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
valuedynamic—Value consumed or transformed by the operation.

View source

weaponCoreDamageAttackerNumber

weaponCoreDamageAttackerNumber

Stores module-wide weapon core damage attacker number state for the miniquake2 game weapons core module.

View source

zeroRandomSigned

function zeroRandomSigned()

Return the zero random signed value.

View source