Files
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.
| Parameter | Type | Default | Description |
|---|
baseEntity | dynamic | — | baseEntity value consumed by this operation. |
breach | dynamic | — | breach value consumed by this operation. |
world | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
View source
# SP_turret_base
function SP_turret_base(entity, world, control)
Spawn turret base.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
control | dynamic | — | control value consumed by this operation. |
View source
# SP_turret_breach
function SP_turret_breach(entity, world, control, limits)
Spawn turret breach.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
control | dynamic | — | control value consumed by this operation. |
limits | dynamic | — | limits value consumed by this operation. |
View source
# SP_turret_driver
function SP_turret_driver(entity, world, control, deathmatch)
Spawn turret driver.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
control | dynamic | — | control value consumed by this operation. |
deathmatch | dynamic | — | deathmatch value consumed by this operation. |
View source
# spawnTurretBase
function spawnTurretBase(entity, world, control)
Spawn turret base.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
control | dynamic | — | control value consumed by this operation. |
View source
# spawnTurretBreach
function spawnTurretBreach(entity, world, control, limits)
Spawn turret breach.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
control | dynamic | — | control value consumed by this operation. |
limits | dynamic | — | limits value consumed by this operation. |
View source
# spawnTurretDriver
function spawnTurretDriver(entity, world, control, deathmatch)
Spawn turret driver.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
control | dynamic | — | control value consumed by this operation. |
deathmatch | dynamic | — | deathmatch value consumed by this operation. |
View source
# tryBindTurretTeam
function tryBindTurretTeam(entity, world)
Bind try turret team.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
world | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
angles | dynamic | — | angles value consumed by this operation. |
View source
# turretAppendTeamMember
function turretAppendTeamMember(master, member, world)
Append turret team member.
| Parameter | Type | Default | Description |
|---|
master | dynamic | — | master value consumed by this operation. |
member | dynamic | — | member value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
View source
# turretAttachControl
function turretAttachControl(entity, control)
Attach turret control.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
control | dynamic | — | control value consumed by this operation. |
View source
# turretBlocked
function turretBlocked(entity, other, world)
Report whether turret blocked.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
other | dynamic | — | other value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
View source
# turretBreachFinishInit
function turretBreachFinishInit(entity, world)
Finish turret breach init.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
View source
# turretBreachFire
function turretBreachFire(entity, world)
Fire turret breach.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
View source
# turretBreachThink
function turretBreachThink(entity, world)
Run turret breach.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
View source
# turretClampDesiredAngles
function turretClampDesiredAngles(entity)
Clamp turret desired angles.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
View source
# turretControl
function turretControl(entity)
Return the turret control value.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
View source
# turretCurrentSkill
inline function turretCurrentSkill(control)
Return the turret current skill value.
| Parameter | Type | Default | Description |
|---|
control | dynamic | — | control value consumed by this operation. |
View source
# turretDriverDie
function turretDriverDie(entity, inflictor, attacker, damage, point, world)
Handle turret driver.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
inflictor | dynamic | — | inflictor value consumed by this operation. |
attacker | dynamic | — | attacker value consumed by this operation. |
damage | dynamic | — | damage value consumed by this operation. |
point | dynamic | — | point value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
View source
# turretDriverLink
function turretDriverLink(entity, world)
Link turret driver.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
View source
# turretDriverThink
function turretDriverThink(entity, world)
Run turret driver.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
View source
# turretDriverUse
function turretDriverUse(entity, other, activator, world)
Use turret driver.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
other | dynamic | — | other value consumed by this operation. |
activator | dynamic | — | activator value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
View source
# turretNormalizeAngle
function turretNormalizeAngle(value)
Normalize turret angle.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed or transformed by the operation. |
View source
# turretShortestDelta
function turretShortestDelta(value)
Return the turret shortest delta value.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed or transformed by the operation. |
View source
# turretSnapToEighth
function turretSnapToEighth(value)
Return the turret snap to eighth value.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed or transformed by the operation. |
View source