Files
src/miniquake/physics.ml
- Package
miniquake.physics- Reachable
- Yes
Imports
Declarations
# accelerate
function accelerate(player, wishDirection, wishSpeed, frameTime, acceleration)
Implements the `accelerate` operation for `miniquake.physics` (accelerate).
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `accelerate`. |
wishDirection | dynamic | — | The wish direction input consumed by `accelerate`. |
wishSpeed | dynamic | — | The wish speed input consumed by `accelerate`. |
frameTime | dynamic | — | Time value used by the operation. |
acceleration | dynamic | — | The acceleration input consumed by `accelerate`. |
View source
# airAccelerate
function airAccelerate(player, wishVelocity, wishSpeed, frameTime, acceleration)
Implements the `airAccelerate` operation for `miniquake.physics` (air accelerate).
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `airAccelerate`. |
wishVelocity | dynamic | — | The wish velocity input consumed by `airAccelerate`. |
wishSpeed | dynamic | — | The wish speed input consumed by `airAccelerate`. |
frameTime | dynamic | — | Time value used by the operation. |
acceleration | dynamic | — | The acceleration input consumed by `airAccelerate`. |
View source
# airMove
function airMove(player, command, frameTime, maxSpeed, acceleration, friction, edgeFriction, stopSpeed, map, server, entityIndex)
Implements the `airMove` operation for `miniquake.physics` (air move).
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `airMove`. |
command | dynamic | — | Console or protocol command to execute. |
frameTime | dynamic | — | Time value used by the operation. |
maxSpeed | dynamic | — | The max speed input consumed by `airMove`. |
acceleration | dynamic | — | The acceleration input consumed by `airMove`. |
friction | dynamic | — | The friction input consumed by `airMove`. |
edgeFriction | dynamic | — | The edge friction input consumed by `airMove`. |
stopSpeed | dynamic | — | The stop speed input consumed by `airMove`. |
map | dynamic | — | The map input consumed by `airMove`. |
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
View source
# applyFriction
function applyFriction(player, map, server, entityIndex, frameTime, friction, edgeFriction, stopSpeed)
Apply friction to the active subsystem state.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `applyFriction`. |
map | dynamic | — | The map input consumed by `applyFriction`. |
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
frameTime | dynamic | — | Time value used by the operation. |
friction | dynamic | — | The friction input consumed by `applyFriction`. |
edgeFriction | dynamic | — | The edge friction input consumed by `applyFriction`. |
stopSpeed | dynamic | — | The stop speed input consumed by `applyFriction`. |
View source
# checkGround
function checkGround(player, map)
A diagnostic ground probe. Runtime physics intentionally does not snap the player down every frame; WinQuake derives FL_ONGROUND from actual movement impacts. The former repeated two-unit snap caused the visible fall/push loop.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `checkGround`. |
map | dynamic | — | The map input consumed by `checkGround`. |
View source
# checkStuck
function checkStuck(player, map, server, entityIndex)
Validate stuck and report any incompatibility.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `checkStuck`. |
map | dynamic | — | The map input consumed by `checkStuck`. |
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
View source
# clampVelocity
function clampVelocity(player, maximum)
Return a validated clamp velocity value.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `clampVelocity`. |
maximum | dynamic | — | Largest accepted value. |
View source
# clearGround
function clearGround(player)
Update module state for ground.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `clearGround`. |
View source
# clientThink
function clientThink(player, command, frameTime, settings, map, server, entityIndex)
Implements the `clientThink` operation for `miniquake.physics` (client think).
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `clientThink`. |
command | dynamic | — | Console or protocol command to execute. |
frameTime | dynamic | — | Time value used by the operation. |
settings | dynamic | — | The settings input consumed by `clientThink`. |
map | dynamic | — | The map input consumed by `clientThink`. |
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
View source
# ClipVelocity
function ClipVelocity(input, normal, overbounce)
Implements the `ClipVelocity` operation for `miniquake.physics` (clip velocity).
| Parameter | Type | Default | Description |
|---|
input | dynamic | — | The input input consumed by `ClipVelocity`. |
normal | dynamic | — | The normal input consumed by `ClipVelocity`. |
overbounce | dynamic | — | The overbounce input consumed by `ClipVelocity`. |
View source
# clipVelocity
function clipVelocity(input, normal, overbounce)
Implements the `clipVelocity` operation for `miniquake.physics` (clip velocity).
| Parameter | Type | Default | Description |
|---|
input | dynamic | — | The input input consumed by `clipVelocity`. |
normal | dynamic | — | The normal input consumed by `clipVelocity`. |
overbounce | dynamic | — | The overbounce input consumed by `clipVelocity`. |
View source
# collapsePusherCorpseBounds
function collapsePusherCorpseBounds(mins)
Implements the `collapsePusherCorpseBounds` operation for `miniquake.physics` (collapse pusher corpse bounds).
| Parameter | Type | Default | Description |
|---|
mins | dynamic | — | The mins input consumed by `collapsePusherCorpseBounds`. |
View source
# createPlayer
function createPlayer(origin, angles)
Create and initialize player.
| Parameter | Type | Default | Description |
|---|
origin | dynamic | — | World-space origin of the operation. |
angles | dynamic | — | Orientation angles used by the operation. |
View source
# dropPunchAngle
function dropPunchAngle(player, frameTime)
Release state for drop punch angle.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `dropPunchAngle`. |
frameTime | dynamic | — | Time value used by the operation. |
View source
# flyMove
function flyMove(player, map, frameTime)
Implements the `flyMove` operation for `miniquake.physics` (fly move).
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `flyMove`. |
map | dynamic | — | The map input consumed by `flyMove`. |
frameTime | dynamic | — | Time value used by the operation. |
View source
# flyMoveDetailed
function flyMoveDetailed(player, map, server, entityIndex, frameTime)
SV_FlyMove: the original four-bump, five-plane clipping algorithm. The detailed form also returns the last vertical wall trace used by SV_WallFriction during step movement.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `flyMoveDetailed`. |
map | dynamic | — | The map input consumed by `flyMoveDetailed`. |
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
frameTime | dynamic | — | Time value used by the operation. |
View source
# flyMoveInternal
function flyMoveInternal(player, map, server, entityIndex, frameTime)
Implements the `flyMoveInternal` operation for `miniquake.physics` (fly move internal).
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `flyMoveInternal`. |
map | dynamic | — | The map input consumed by `flyMoveInternal`. |
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
frameTime | dynamic | — | Time value used by the operation. |
View source
# horizontalLength
function horizontalLength(value)
Return horizontal length derived from the active module state.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed by `horizontalLength`. |
View source
# markGround
function markGround(player, entityIndex)
Implements the `markGround` operation for `miniquake.physics` (mark ground).
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `markGround`. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
View source
# MAX_CLIP_PLANES
const MAX_CLIP_PLANES = 5
Defines the max clip planes value used by `miniquake.physics`.
View source
# move
function move(player, map, command, frameTime, registry)
World-only compatibility path used by the synthetic tests and diagnostic tools. It mirrors the server path without dynamic edicts or QuakeC impacts.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `move`. |
map | dynamic | — | The map input consumed by `move`. |
command | dynamic | — | Console or protocol command to execute. |
frameTime | dynamic | — | Time value used by the operation. |
registry | dynamic | — | The registry input consumed by `move`. |
View source
# movementSettings
function movementSettings(registry)
Transfer data for movement settings.
| Parameter | Type | Default | Description |
|---|
registry | dynamic | — | The registry input consumed by `movementSettings`. |
View source
# moveServer
function moveServer(player, server, entityIndex, command, frameTime, registry)
Transfer data for move server.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `moveServer`. |
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
command | dynamic | — | Console or protocol command to execute. |
frameTime | dynamic | — | Time value used by the operation. |
registry | dynamic | — | The registry input consumed by `moveServer`. |
View source
# MOVETYPE_BOUNCEMISSILE_COMPAT
const MOVETYPE_BOUNCEMISSILE_COMPAT = 11
These two movetypes are present in the QUAKE2-conditioned half of the pinned MiniQuake source. Keep them private to this pendant so the shared protocol/constants surface remains the stock Quake 1 one.
View source
# MOVETYPE_FOLLOW_COMPAT
const MOVETYPE_FOLLOW_COMPAT = 12
Defines the movetype follow compat value used by `miniquake.physics`.
View source
# nativeSolid
function nativeSolid(server, entityIndex)
Implements the `nativeSolid` operation for `miniquake.physics` (native solid).
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
View source
# physicsEntityCount
function physicsEntityCount(server)
-------------------------------------------------------------------------- sv_phys.c compatibility surface
The lower-case helpers above are the convenient PlayerState API used by the
local client. The functions below are the edict-oriented MiniQuake API. They
intentionally keep the original names and ordering rules so protocol tests,
QuakeC and server code can use the same behavioral units as sv_phys.c.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
View source
# physicsEntityFree
function physicsEntityFree(server, entityIndex)
Apply server-physics entity free semantics.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
View source
# physicsExecuteEntityFunction
function physicsExecuteEntityFunction(server, entityIndex, otherIndex, fieldName, executionTime)
Apply server-physics execute entity function semantics.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
otherIndex | dynamic | — | Zero-based index of the requested entry. |
fieldName | dynamic | — | Name that identifies the requested value or resource. |
executionTime | dynamic | — | Time value used by the operation. |
View source
# physicsExecuteNamedFunction
function physicsExecuteNamedFunction(server, functionName, entityIndex)
Apply server-physics execute named function semantics.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
functionName | dynamic | — | Name that identifies the requested value or resource. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
View source
# physicsHasBaseVelocity
function physicsHasBaseVelocity(server)
Apply server-physics has base velocity semantics.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
View source
# physicsPlayerFromEdict
function physicsPlayerFromEdict(server, entityIndex)
Apply server-physics player from edict semantics.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
View source
# physicsPusherBlocked
function physicsPusherBlocked(server, pusherIndex, blockedBy)
Apply server-physics pusher blocked semantics.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
pusherIndex | dynamic | — | Zero-based index of the requested entry. |
blockedBy | dynamic | — | The blocked by input consumed by `physicsPusherBlocked`. |
View source
# physicsQueueSound
function physicsQueueSound(server, entityIndex, sample)
Apply server-physics queue sound semantics.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
sample | dynamic | — | The sample input consumed by `physicsQueueSound`. |
View source
# physicsRefreshConveyorVelocity
function physicsRefreshConveyorVelocity(server, entityIndex)
The QUAKE2-conditioned MiniQuake branches use the presence of the extended entvars layout. Testing the field is the MiniLang equivalent: stock v6 progs.dat files have no basevelocity and therefore stay on the 1.09 path.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
View source
# physicsStrictOverlap
function physicsStrictOverlap(minsA, maxsA, minsB, maxsB)
Apply server-physics strict overlap semantics.
| Parameter | Type | Default | Description |
|---|
minsA | dynamic | — | The mins a input consumed by `physicsStrictOverlap`. |
maxsA | dynamic | — | The maxs a input consumed by `physicsStrictOverlap`. |
minsB | dynamic | — | The mins b input consumed by `physicsStrictOverlap`. |
maxsB | dynamic | — | The maxs b input consumed by `physicsStrictOverlap`. |
View source
# physicsVectorIsZero
function physicsVectorIsZero(value)
Apply server-physics vector is zero semantics.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed by `physicsVectorIsZero`. |
View source
# physicsWritePlayerEdict
function physicsWritePlayerEdict(server, entityIndex, player)
Apply server-physics write player edict semantics.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
player | dynamic | — | The player input consumed by `physicsWritePlayerEdict`. |
View source
# positionDistanceSquared
function positionDistanceSquared(a, b)
Implements the `positionDistanceSquared` operation for `miniquake.physics` (position distance squared).
| Parameter | Type | Default | Description |
|---|
a | dynamic | — | The a input consumed by `positionDistanceSquared`. |
b | dynamic | — | The b input consumed by `positionDistanceSquared`. |
View source
# pushPlayer
function pushPlayer(server, map, entityIndex, player, move)
Add state for push player.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
map | dynamic | — | The map input consumed by `pushPlayer`. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
player | dynamic | — | The player input consumed by `pushPlayer`. |
move | dynamic | — | The move input consumed by `pushPlayer`. |
View source
# relinkRecoveredPlayer
function relinkRecoveredPlayer(player, server, entityIndex)
Relink a recovered client immediately and pull trigger-side physical changes back into its detached PlayerState mirror. In WinQuake these are the same edict; omitting the pull would let a teleport touch be overwritten later in the current movement frame.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `relinkRecoveredPlayer`. |
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
View source
# separateActorOverlap
function separateActorOverlap(player, server, entityIndex, blockerIndex, original)
Separate a client from a live actor when both full hulls already overlap and neither oldorigin nor Quake's small precision-recovery offsets can escape. Spawn/teleport protection remains the responsibility of stock spawn_tdeath: its teleport_time window suppresses this fallback until QuakeC has had its force_retouch frames and can award the correct telefrag.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `separateActorOverlap`. |
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
blockerIndex | dynamic | — | Zero-based index of the requested entry. |
original | dynamic | — | The original input consumed by `separateActorOverlap`. |
View source
# STEP_SIZE
const STEP_SIZE = 18.
Defines the step size value used by `miniquake.physics`.
View source
# stepMove
function stepMove(player, map, frameTime)
Advance move by one processing step.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `stepMove`. |
map | dynamic | — | The map input consumed by `stepMove`. |
frameTime | dynamic | — | Time value used by the operation. |
View source
# STOP_EPSILON
const STOP_EPSILON = 0.1
Defines the stop epsilon value used by `miniquake.physics`.
View source
# strictQuake109
function strictQuake109()
The compatibility profile in this port is the unconditioned WinQuake / MiniQuake 1.09 source, never the optional QUAKE2 preprocessor branch.
View source
# SV_AddGravity
function SV_AddGravity(server, entityIndex, gravity, frameTime)
Apply the Quake-compatible sv add gravity behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
gravity | dynamic | — | The gravity input consumed by `SV_AddGravity`. |
frameTime | dynamic | — | Time value used by the operation. |
View source
# SV_CheckAllEnts
function SV_CheckAllEnts(server)
SV_CheckAllEnts is a diagnostic pass in MiniQuake. Return the offending edict indexes as well as appending the original diagnostic text.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
View source
# SV_CheckStuck
function SV_CheckStuck(server, entityIndex)
Apply the Quake-compatible sv check stuck behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
View source
# SV_CheckVelocity
function SV_CheckVelocity(server, entityIndex, maxVelocity)
Apply the Quake-compatible sv check velocity behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
maxVelocity | dynamic | — | The max velocity input consumed by `SV_CheckVelocity`. |
View source
# SV_CheckWater
function SV_CheckWater(server, entityIndex)
Apply the Quake-compatible sv check water behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
View source
# SV_CheckWaterTransition
function SV_CheckWaterTransition(server, entityIndex)
Apply the Quake-compatible sv check water transition behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
View source
# SV_FinishForceRetouch
function SV_FinishForceRetouch(server, forceRetouch)
Apply the Quake-compatible sv finish force retouch behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
forceRetouch | dynamic | — | The force retouch input consumed by `SV_FinishForceRetouch`. |
View source
# SV_FlyMove
function SV_FlyMove(server, entityIndex, moveTime)
Apply the Quake-compatible sv fly move behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
moveTime | dynamic | — | Time value used by the operation. |
View source
# SV_ForceRetouchEntity
function SV_ForceRetouchEntity(server, entityIndex, forceRetouch)
Apply the Quake-compatible sv force retouch entity behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
forceRetouch | dynamic | — | The force retouch input consumed by `SV_ForceRetouchEntity`. |
View source
# SV_ForceRetouchValue
function SV_ForceRetouchValue(server)
Apply the Quake-compatible sv force retouch value behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
View source
# SV_Impact
function SV_Impact(server, firstEntity, secondEntity)
Apply the Quake-compatible sv impact behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
firstEntity | dynamic | — | The first entity input consumed by `SV_Impact`. |
secondEntity | dynamic | — | The second entity input consumed by `SV_Impact`. |
View source
# SV_Physics
function SV_Physics(server, frameTime, gravity, maxVelocity)
Apply the Quake-compatible sv physics behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
frameTime | dynamic | — | Time value used by the operation. |
gravity | dynamic | — | The gravity input consumed by `SV_Physics`. |
maxVelocity | dynamic | — | The max velocity input consumed by `SV_Physics`. |
View source
# SV_Physics_Client
function SV_Physics_Client(server, entityIndex, frameTime, gravity, maxVelocity)
Apply the Quake-compatible sv physics client behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
frameTime | dynamic | — | Time value used by the operation. |
gravity | dynamic | — | The gravity input consumed by `SV_Physics_Client`. |
maxVelocity | dynamic | — | The max velocity input consumed by `SV_Physics_Client`. |
View source
# SV_Physics_Follow
function SV_Physics_Follow(server, entityIndex, frameTime)
Apply the Quake-compatible sv physics follow behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
frameTime | dynamic | — | Time value used by the operation. |
View source
# SV_Physics_Noclip
function SV_Physics_Noclip(server, entityIndex, frameTime)
Apply the Quake-compatible sv physics noclip behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
frameTime | dynamic | — | Time value used by the operation. |
View source
# SV_Physics_NonClientEntity
function SV_Physics_NonClientEntity(server, entityIndex, frameTime, gravity, maxVelocity)
Dispatch one non-client edict through the exact unconditioned WinQuake 1.09 SV_Physics switch. The integrated server frame uses this entry point after it has run client movement, so the production path and the direct sv_main pendant share the same pusher, toss, step, noclip and think semantics.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
frameTime | dynamic | — | Time value used by the operation. |
gravity | dynamic | — | The gravity input consumed by `SV_Physics_NonClientEntity`. |
maxVelocity | dynamic | — | The max velocity input consumed by `SV_Physics_NonClientEntity`. |
View source
# SV_Physics_None
function SV_Physics_None(server, entityIndex, frameTime)
Apply the Quake-compatible sv physics none behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
frameTime | dynamic | — | Time value used by the operation. |
View source
# SV_Physics_Pusher
function SV_Physics_Pusher(server, entityIndex, frameTime)
Apply the Quake-compatible sv physics pusher behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
frameTime | dynamic | — | Time value used by the operation. |
View source
# SV_Physics_Step
function SV_Physics_Step(server, entityIndex, frameTime, gravity, maxVelocity)
Apply the Quake-compatible sv physics step behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
frameTime | dynamic | — | Time value used by the operation. |
gravity | dynamic | — | The gravity input consumed by `SV_Physics_Step`. |
maxVelocity | dynamic | — | The max velocity input consumed by `SV_Physics_Step`. |
View source
# SV_Physics_Step_Quake2
function SV_Physics_Step_Quake2(server, entityIndex, frameTime, gravity, maxVelocity)
The alternate QUAKE2 body is retained as a named compatibility entry point; MiniQuake 1.09 dispatches the non-QUAKE2 SV_Physics_Step above.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
frameTime | dynamic | — | Time value used by the operation. |
gravity | dynamic | — | The gravity input consumed by `SV_Physics_Step_Quake2`. |
maxVelocity | dynamic | — | The max velocity input consumed by `SV_Physics_Step_Quake2`. |
View source
# SV_Physics_Toss
function SV_Physics_Toss(server, entityIndex, frameTime, gravity, maxVelocity)
Apply the Quake-compatible sv physics toss behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
frameTime | dynamic | — | Time value used by the operation. |
gravity | dynamic | — | The gravity input consumed by `SV_Physics_Toss`. |
maxVelocity | dynamic | — | The max velocity input consumed by `SV_Physics_Toss`. |
View source
# SV_PushEntity
function SV_PushEntity(server, entityIndex, push)
Apply the Quake-compatible sv push entity behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
push | dynamic | — | The push input consumed by `SV_PushEntity`. |
View source
# SV_PushMove
function SV_PushMove(server, pusherIndex, moveTime)
Apply the Quake-compatible sv push move behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
pusherIndex | dynamic | — | Zero-based index of the requested entry. |
moveTime | dynamic | — | Time value used by the operation. |
View source
# SV_PushRotate
function SV_PushRotate(server, pusherIndex, moveTime)
QUAKE2 kept a rotating-pusher sibling in this source file. It is not used by MiniQuake 1.09, but retaining it makes the source-file pendant complete.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
pusherIndex | dynamic | — | Zero-based index of the requested entry. |
moveTime | dynamic | — | Time value used by the operation. |
View source
# SV_RunThink
function SV_RunThink(server, entityIndex, frameTime)
Apply the Quake-compatible sv run think behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
frameTime | dynamic | — | Time value used by the operation. |
View source
# SV_Trace_Toss
function SV_Trace_Toss(server, entityIndex, ignoreEntity, gravity, maxVelocity)
Apply the Quake-compatible sv trace toss behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
ignoreEntity | dynamic | — | The ignore entity input consumed by `SV_Trace_Toss`. |
gravity | dynamic | — | The gravity input consumed by `SV_Trace_Toss`. |
maxVelocity | dynamic | — | The max velocity input consumed by `SV_Trace_Toss`. |
View source
# SV_TryUnstick
function SV_TryUnstick(server, entityIndex, oldVelocity)
Apply the Quake-compatible sv try unstick behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
oldVelocity | dynamic | — | The old velocity input consumed by `SV_TryUnstick`. |
View source
# SV_WalkMove
function SV_WalkMove(server, entityIndex, frameTime)
Apply the Quake-compatible sv walk move behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
frameTime | dynamic | — | Time value used by the operation. |
View source
# SV_WallFriction
function SV_WallFriction(server, entityIndex, trace)
Apply the Quake-compatible sv wall friction behavior.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
trace | dynamic | — | The trace input consumed by `SV_WallFriction`. |
View source
# traceMove
function traceMove(server, map, entityIndex, start, mins, maxs, finish, moveType)
Trace move through the collision world.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | Server state participating in the operation. |
map | dynamic | — | The map input consumed by `traceMove`. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
start | dynamic | — | The start input consumed by `traceMove`. |
mins | dynamic | — | The mins input consumed by `traceMove`. |
maxs | dynamic | — | The maxs input consumed by `traceMove`. |
finish | dynamic | — | The finish input consumed by `traceMove`. |
moveType | dynamic | — | The move type input consumed by `traceMove`. |
View source
# tryUnstick
function tryUnstick(player, map, server, entityIndex, oldVelocity)
Implements the `tryUnstick` operation for `miniquake.physics` (try unstick).
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `tryUnstick`. |
map | dynamic | — | The map input consumed by `tryUnstick`. |
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
oldVelocity | dynamic | — | The old velocity input consumed by `tryUnstick`. |
View source
# updateWaterLevel
function updateWaterLevel(player, map)
Update module state for water level.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `updateWaterLevel`. |
map | dynamic | — | The map input consumed by `updateWaterLevel`. |
View source
# walkMoveInternal
function walkMoveInternal(player, map, server, entityIndex, frameTime)
Implements the `walkMoveInternal` operation for `miniquake.physics` (walk move internal).
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `walkMoveInternal`. |
map | dynamic | — | The map input consumed by `walkMoveInternal`. |
server | dynamic | — | Server state participating in the operation. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
frameTime | dynamic | — | Time value used by the operation. |
View source
# wallFriction
function wallFriction(player, plane)
Implements the `wallFriction` operation for `miniquake.physics` (wall friction).
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `wallFriction`. |
plane | dynamic | — | The plane input consumed by `wallFriction`. |
View source
# waterMove
function waterMove(player, command, frameTime, maxSpeed, acceleration, friction)
Implements the `waterMove` operation for `miniquake.physics` (water move).
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | The player input consumed by `waterMove`. |
command | dynamic | — | Console or protocol command to execute. |
frameTime | dynamic | — | Time value used by the operation. |
maxSpeed | dynamic | — | The max speed input consumed by `waterMove`. |
acceleration | dynamic | — | The acceleration input consumed by `waterMove`. |
friction | dynamic | — | The friction input consumed by `waterMove`. |
View source
# zeroVector
function zeroVector()
Implements the `zeroVector` operation for `miniquake.physics` (zero vector).
View source