MiniQuake2

src/miniquake2/game/world/turret.ml

Provides miniquake2 game world turret facilities for this project.

Package
miniquake2.game.world.turret
Reachable
Yes

Imports

Declarations

bindTurretTeam

function bindTurretTeam(baseEntity, breach, world)

Bind turret team.

ParameterTypeDefaultDescription
baseEntitydynamic—baseEntity value consumed by this operation.
breachdynamic—breach value consumed by this operation.
worlddynamic—world value consumed by this operation.

View source

restoreTurretState

function restoreTurretState(entity, world)

Function identities are not serialized. Rebind the stock phase only after private-save reference numbers have been resolved, so an already linked driver resumes turret_driver_think instead of appending itself a second time.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
worlddynamic—world value consumed by this operation.

View source

SP_turret_base

function SP_turret_base(entity, world, control)

Spawn turret base.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
worlddynamic—world value consumed by this operation.
controldynamic—control value consumed by this operation.

View source

SP_turret_breach

function SP_turret_breach(entity, world, control, limits)

Spawn turret breach.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
worlddynamic—world value consumed by this operation.
controldynamic—control value consumed by this operation.
limitsdynamic—limits value consumed by this operation.

View source

SP_turret_driver

function SP_turret_driver(entity, world, control, deathmatch)

Spawn turret driver.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
worlddynamic—world value consumed by this operation.
controldynamic—control value consumed by this operation.
deathmatchdynamic—deathmatch value consumed by this operation.

View source

spawnTurretBase

function spawnTurretBase(entity, world, control)

Spawn turret base.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
worlddynamic—world value consumed by this operation.
controldynamic—control value consumed by this operation.

View source

spawnTurretBreach

function spawnTurretBreach(entity, world, control, limits)

Spawn turret breach.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
worlddynamic—world value consumed by this operation.
controldynamic—control value consumed by this operation.
limitsdynamic—limits value consumed by this operation.

View source

spawnTurretDriver

function spawnTurretDriver(entity, world, control, deathmatch)

Spawn turret driver.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
worlddynamic—world value consumed by this operation.
controldynamic—control value consumed by this operation.
deathmatchdynamic—deathmatch value consumed by this operation.

View source

tryBindTurretTeam

function tryBindTurretTeam(entity, world)

Bind try turret team.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
worlddynamic—world value consumed by this operation.

View source

TURRET_FIRE_REQUEST

const TURRET_FIRE_REQUEST = 65536

Defines the turret fire request constant used by the miniquake2 game world turret module.

View source

TURRET_NO_KNOCKBACK

const TURRET_NO_KNOCKBACK = 2048

Defines the turret no knockback constant used by the miniquake2 game world turret module.

View source

turretAngleVectors

function turretAngleVectors(angles)

Return the turret angle vectors value.

ParameterTypeDefaultDescription
anglesdynamic—angles value consumed by this operation.

View source

turretAppendTeamMember

function turretAppendTeamMember(master, member, world)

Append turret team member.

ParameterTypeDefaultDescription
masterdynamic—master value consumed by this operation.
memberdynamic—member value consumed by this operation.
worlddynamic—world value consumed by this operation.

View source

turretAttachControl

function turretAttachControl(entity, control)

Attach turret control.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
controldynamic—control value consumed by this operation.

View source

turretBlocked

function turretBlocked(entity, other, world)

Report whether turret blocked.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
otherdynamic—other value consumed by this operation.
worlddynamic—world value consumed by this operation.

View source

turretBreachFinishInit

function turretBreachFinishInit(entity, world)

Finish turret breach init.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
worlddynamic—world value consumed by this operation.

View source

turretBreachFire

function turretBreachFire(entity, world)

Fire turret breach.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
worlddynamic—world value consumed by this operation.

View source

turretBreachThink

function turretBreachThink(entity, world)

Run turret breach.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
worlddynamic—world value consumed by this operation.

View source

turretClampDesiredAngles

function turretClampDesiredAngles(entity)

Clamp turret desired angles.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.

View source

turretControl

function turretControl(entity)

Return the turret control value.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.

View source

turretCurrentSkill

inline function turretCurrentSkill(control)

Return the turret current skill value.

ParameterTypeDefaultDescription
controldynamic—control value consumed by this operation.

View source

turretDriverDie

function turretDriverDie(entity, inflictor, attacker, damage, point, world)

Handle turret driver.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
inflictordynamic—inflictor value consumed by this operation.
attackerdynamic—attacker value consumed by this operation.
damagedynamic—damage value consumed by this operation.
pointdynamic—point value consumed by this operation.
worlddynamic—world value consumed by this operation.

View source

turretDriverThink

function turretDriverThink(entity, world)

Run turret driver.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
worlddynamic—world value consumed by this operation.

View source

turretDriverUse

function turretDriverUse(entity, other, activator, world)

Use turret driver.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
otherdynamic—other value consumed by this operation.
activatordynamic—activator value consumed by this operation.
worlddynamic—world value consumed by this operation.

View source

turretNormalizeAngle

function turretNormalizeAngle(value)

Normalize turret angle.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

turretShortestDelta

function turretShortestDelta(value)

Return the turret shortest delta value.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

turretSnapToEighth

function turretSnapToEighth(value)

Return the turret snap to eighth value.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source