MiniQuake2

src/miniquake2/game/player/view.ml

Provides miniquake2 game player view facilities for this project.

Package
miniquake2.game.player.view
Reachable
Yes

Imports

Declarations

ApplyDamage

function ApplyDamage(context, player, amount, damageFlags, meansOfDeath)

A custom callback may apply armor/team/death rules and returns actual health damage. The default keeps the environment layer useful before full wiring.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
playerdynamic—player value consumed by this operation.
amountdynamic—amount value consumed by this operation.
damageFlagsdynamic—damageFlags value consumed by this operation.
meansOfDeathdynamic—meansOfDeath value consumed by this operation.

View source

clamp

function clamp(value, minimum, maximum)

Clamp state.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.
minimumdynamic—minimum value consumed by this operation.
maximumdynamic—maximum value consumed by this operation.

View source

ClientViewFrame

function ClientViewFrame(context, player)

Return the client view frame value.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
playerdynamic—player value consumed by this operation.

View source

emitSound

function emitSound(context, player, channel, name, attenuation)

Emit sound.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
playerdynamic—player value consumed by this operation.
channeldynamic—channel value consumed by this operation.
namedynamic—Name of the affected item.
attenuationdynamic—attenuation value consumed by this operation.

View source

G_SetClientEffects

function G_SetClientEffects(context, player)

Set g client effects.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
playerdynamic—player value consumed by this operation.

View source

G_SetClientEvent

function G_SetClientEvent(player)

Set g client event.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.

View source

G_SetClientFrame

function G_SetClientFrame(player)

Set g client frame.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.

View source

G_SetClientSound

function G_SetClientSound(context, player)

Set g client sound.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
playerdynamic—player value consumed by this operation.

View source

P_DamageFeedback

function P_DamageFeedback(context, player, forward, right)

Return the p damage feedback value.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
playerdynamic—player value consumed by this operation.
forwarddynamic—forward value consumed by this operation.
rightdynamic—right value consumed by this operation.

View source

P_FallingDamage

function P_FallingDamage(context, player)

Return the p falling damage value.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
playerdynamic—player value consumed by this operation.

View source

P_WorldEffects

function P_WorldEffects(context, player)

Return the p world effects value.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
playerdynamic—player value consumed by this operation.

View source

pointVector

function pointVector(point)

Return the point vector value.

ParameterTypeDefaultDescription
pointdynamic—point value consumed by this operation.

View source

randomIndex

function randomIndex(context, count)

Return the random index.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
countdynamic—Number of items or units to process.

View source

RecordDamage

function RecordDamage(player, blood, armor, powerArmor, knockback, point)

Public adapter for the damage accumulators normally filled by T_Damage.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.
blooddynamic—blood value consumed by this operation.
armordynamic—armor value consumed by this operation.
powerArmordynamic—powerArmor value consumed by this operation.
knockbackdynamic—knockback value consumed by this operation.
pointdynamic—point value consumed by this operation.

View source

SV_AddBlend

function SV_AddBlend(red, green, blue, alpha, blend)

Add sv blend.

ParameterTypeDefaultDescription
reddynamic—red value consumed by this operation.
greendynamic—green value consumed by this operation.
bluedynamic—blue value consumed by this operation.
alphadynamic—alpha value consumed by this operation.
blenddynamic—blend value consumed by this operation.

View source

SV_CalcBlend

function SV_CalcBlend(context, player)

Return the sv calc blend value.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
playerdynamic—player value consumed by this operation.

View source

SV_CalcGunOffset

function SV_CalcGunOffset(context, player, forward, right, up)

Return the sv calc gun offset.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
playerdynamic—player value consumed by this operation.
forwarddynamic—forward value consumed by this operation.
rightdynamic—right value consumed by this operation.
updynamic—up value consumed by this operation.

View source

SV_CalcRoll

function SV_CalcRoll(context, player, right)

Return the sv calc roll value.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
playerdynamic—player value consumed by this operation.
rightdynamic—right value consumed by this operation.

View source

SV_CalcViewOffset

function SV_CalcViewOffset(context, player, forward, right)

Return the sv calc view offset.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
playerdynamic—player value consumed by this operation.
forwarddynamic—forward value consumed by this operation.
rightdynamic—right value consumed by this operation.

View source

UpdateBob

function UpdateBob(player)

Update bob.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.

View source