MiniQuake

src/miniquake/player_move.ml

Package
miniquake.player_move
Reachable
Yes

Imports

Declarations

accelerate

function accelerate(player, wishDirection, wishSpeed, frameTime, acceleration)

Implements the `accelerate` operation for `miniquake.player_move` (accelerate).

ParameterTypeDefaultDescription
playerdynamic—The player input consumed by `accelerate`.
wishDirectiondynamic—The wish direction input consumed by `accelerate`.
wishSpeeddynamic—The wish speed input consumed by `accelerate`.
frameTimedynamic—Time value used by the operation.
accelerationdynamic—The acceleration input consumed by `accelerate`.

View source

airAccelerate

function airAccelerate(player, wishVelocity, wishSpeed, frameTime, acceleration)

Implements the `airAccelerate` operation for `miniquake.player_move` (air accelerate).

ParameterTypeDefaultDescription
playerdynamic—The player input consumed by `airAccelerate`.
wishVelocitydynamic—The wish velocity input consumed by `airAccelerate`.
wishSpeeddynamic—The wish speed input consumed by `airAccelerate`.
frameTimedynamic—Time value used by the operation.
accelerationdynamic—The acceleration input consumed by `airAccelerate`.

View source

applyCommand

function applyCommand(player, map, command, frameTime)

Apply command to the active subsystem state.

ParameterTypeDefaultDescription
playerdynamic—The player input consumed by `applyCommand`.
mapdynamic—The map input consumed by `applyCommand`.
commanddynamic—Console or protocol command to execute.
frameTimedynamic—Time value used by the operation.

View source

cameraOrigin

function cameraOrigin(player)

Return camera origin derived from the active module state.

ParameterTypeDefaultDescription
playerdynamic—The player input consumed by `cameraOrigin`.

View source

checkGround

function checkGround(player, map)

Validate ground and report any incompatibility.

ParameterTypeDefaultDescription
playerdynamic—The player input consumed by `checkGround`.
mapdynamic—The map input consumed by `checkGround`.

View source

checkWater

function checkWater(player, map)

Validate water and report any incompatibility.

ParameterTypeDefaultDescription
playerdynamic—The player input consumed by `checkWater`.
mapdynamic—The map input consumed by `checkWater`.

View source

clipVelocity

function clipVelocity(input, normal, overbounce)

Implements the `clipVelocity` operation for `miniquake.player_move` (clip velocity).

ParameterTypeDefaultDescription
inputdynamic—The input input consumed by `clipVelocity`.
normaldynamic—The normal input consumed by `clipVelocity`.
overbouncedynamic—The overbounce input consumed by `clipVelocity`.

View source

create

function create(origin, angles)

Implements the `create` operation for `miniquake.player_move` (create).

ParameterTypeDefaultDescription
origindynamic—World-space origin of the operation.
anglesdynamic—Orientation angles used by the operation.

View source

createPlayer

function createPlayer(origin, angles)

Create and initialize player.

ParameterTypeDefaultDescription
origindynamic—World-space origin of the operation.
anglesdynamic—Orientation angles used by the operation.

View source

horizontalSpeed

function horizontalSpeed(velocity)

Implements the `horizontalSpeed` operation for `miniquake.player_move` (horizontal speed).

ParameterTypeDefaultDescription
velocitydynamic—Velocity applied by the operation.

View source

move

function move(player, map, command, frameTime, registry)

Transfer data for move.

ParameterTypeDefaultDescription
playerdynamic—The player input consumed by `move`.
mapdynamic—The map input consumed by `move`.
commanddynamic—Console or protocol command to execute.
frameTimedynamic—Time value used by the operation.
registrydynamic—The registry input consumed by `move`.

View source

slideMove

function slideMove(player, map, frameTime)

Implements the `slideMove` operation for `miniquake.player_move` (slide move).

ParameterTypeDefaultDescription
playerdynamic—The player input consumed by `slideMove`.
mapdynamic—The map input consumed by `slideMove`.
frameTimedynamic—Time value used by the operation.

View source

userFriction

function userFriction(player, map, frameTime, friction, edgeFriction, stopSpeed)

Implements the `userFriction` operation for `miniquake.player_move` (user friction).

ParameterTypeDefaultDescription
playerdynamic—The player input consumed by `userFriction`.
mapdynamic—The map input consumed by `userFriction`.
frameTimedynamic—Time value used by the operation.
frictiondynamic—The friction input consumed by `userFriction`.
edgeFrictiondynamic—The edge friction input consumed by `userFriction`.
stopSpeeddynamic—The stop speed input consumed by `userFriction`.

View source

walkMove

function walkMove(player, map, frameTime)

Implements the `walkMove` operation for `miniquake.player_move` (walk move).

ParameterTypeDefaultDescription
playerdynamic—The player input consumed by `walkMove`.
mapdynamic—The map input consumed by `walkMove`.
frameTimedynamic—Time value used by the operation.

View source

waterMove

function waterMove(player, command, frameTime)

Implements the `waterMove` operation for `miniquake.player_move` (water move).

ParameterTypeDefaultDescription
playerdynamic—The player input consumed by `waterMove`.
commanddynamic—Console or protocol command to execute.
frameTimedynamic—Time value used by the operation.

View source

wishMove

function wishMove(player, command, frameTime, map)

Implements the `wishMove` operation for `miniquake.player_move` (wish move).

ParameterTypeDefaultDescription
playerdynamic—The player input consumed by `wishMove`.
commanddynamic—Console or protocol command to execute.
frameTimedynamic—Time value used by the operation.
mapdynamic—The map input consumed by `wishMove`.

View source

zeroVector

function zeroVector()

Implements the `zeroVector` operation for `miniquake.player_move` (zero vector).

View source