MiniQuake2

src/miniquake2/game/ai/core.ml

Provides miniquake2 game ai core facilities for this project.

Package
miniquake2.game.ai.core
Reachable
Yes

Imports

Declarations

actorYaw

function actorYaw(actor)

Return the actor yaw.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.

View source

ai_charge

function ai_charge(actor, distance, context)

Return the ai charge value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
distancedynamic—distance value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

ai_checkattack

function ai_checkattack(actor, distance, context)

Return the ai checkattack value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
distancedynamic—distance value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

ai_move

function ai_move(actor, distance, context)

Move ai.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
distancedynamic—distance value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

ai_run

function ai_run(actor, distance, context)

Port the stock ai_run pursuit state machine. Lost-sight flags and temporary goals change in stock order so trail markers are consumed at most once.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
distancedynamic—distance value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

ai_run_slide

function ai_run_slide(actor, distance, context)

Run ai slide.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
distancedynamic—distance value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

ai_stand

function ai_stand(actor, distance, context)

Return the ai stand value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
distancedynamic—distance value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

ai_turn

function ai_turn(actor, distance, context)

Return the ai turn value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
distancedynamic—distance value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

ai_walk

function ai_walk(actor, distance, context)

Return the ai walk value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
distancedynamic—distance value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

aiRunCourseScratch

aiRunCourseScratch

Stores module-wide ai run course scratch state for the miniquake2 game ai core module.

View source

angleMod

function angleMod(value)

Return the angle mod value.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

candidateFromContext

function candidateFromContext(actor, context)

Return the candidate from context.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

ChangeYaw

function ChangeYaw(actor)

Return the change yaw.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.

View source

copyOriginToArray

inline function copyOriginToArray(target, origin)

Copy origin to array.

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

View source

directionTo

function directionTo(first, second)

Return the direction to value.

ParameterTypeDefaultDescription
firstdynamic—first value consumed by this operation.
seconddynamic—second value consumed by this operation.

View source

DispatchAttackState

function DispatchAttackState(actor, context, enemyYaw)

Dispatch attack state.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.
enemyYawdynamic—enemyYaw value consumed by this operation.

View source

FacingIdeal

function FacingIdeal(actor)

Return the facing ideal value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.

View source

FindTarget

function FindTarget(actor, context)

Find target.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

FoundTarget

function FoundTarget(actor, context)

Return the found target value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

HuntTarget

function HuntTarget(actor, context)

Return the hunt target value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

infront

function infront(first, second)

Return the infront value.

ParameterTypeDefaultDescription
firstdynamic—first value consumed by this operation.
seconddynamic—second value consumed by this operation.

View source

M_CheckAttack

function M_CheckAttack(actor, context, enemyRange)

Validate m attack.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.
enemyRangedynamic—enemyRange value consumed by this operation.

View source

moveToGoal

function moveToGoal(actor, distance, context)

Move to goal.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
distancedynamic—distance value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

pursuitGoal

function pursuitGoal(actor)

Return the pursuit goal value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.

View source

range

function range(first, second)

Return the range value.

ParameterTypeDefaultDescription
firstdynamic—first value consumed by this operation.
seconddynamic—second value consumed by this operation.

View source

scalarToYaw

inline function scalarToYaw(x, y)

Return the scalar to yaw.

ParameterTypeDefaultDescription
xdynamic—Horizontal coordinate used by the operation.
ydynamic—Vertical coordinate used by the operation.

View source

setActorYaw

function setActorYaw(actor, value)

Set actor yaw.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
valuedynamic—Value consumed or transformed by the operation.

View source

vectorLength

function vectorLength(value)

Return the vector length.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

vectorToYaw

function vectorToYaw(value)

Return the vector to yaw.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

vectorX

function vectorX(value)

Return the vector x value.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

vectorY

function vectorY(value)

Return the vector y value.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

vectorZ

function vectorZ(value)

Return the vector z value.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

visible

function visible(actor, other, context)

Report whether visible.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
otherdynamic—other value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

walkMove

function walkMove(actor, yaw, distance, context)

Move walk.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
yawdynamic—yaw value consumed by this operation.
distancedynamic—distance value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source