FTE's QuakeWorld player movement (PM_PlayerMove): one command of a player's input
moving a box through the world and the entities near it.
pm = QuakeServer.Pmove.player_move(pm)The caller fills a QuakeServer.Pmove with the player's state, the command
(QuakeServer.Pmove.Command), the movement settings (QuakeServer.Pmove.Movevars)
and the things it can meet (physents, a tuple of QuakeServer.Pmove.Physent, the
world first), and reads the state back.
pm_type—:normal,:dead(no acceleration, no jumping),:fly(flying, bumping into walls),:noneand:freeze(no movement),:spectatorand:old_spectator(flying through everything; the old one stops moving while at speed),:wallwalk(the wall under the player is the ground) or:six_dofgravitydir— the way down; a zero vector is taken as{0, 0, -1}onground,groundent(an index intophysents) andgroundplane(its normal) — what the player stands onwaterlevel0 to 3 andwatertype, the contents bits (QuakeServer.Contents) at the player's feetonladder— set on reaching a ladder; only the caller clears itjump_held,jump_msec,waterjumptime— the jump button's state and the seconds left of a jump out of watersafeorigin— the last spot the player was found to fit, where a stuck player is returned whensafeorigin_knowntouched— indexes intophysentsof what the move ran into, newest first
Summary
Functions
Move the player for its command (PM_PlayerMove); touched starts empty.
Types
@type pm_type() ::
:normal
| :old_spectator
| :spectator
| :dead
| :fly
| :none
| :freeze
| :wallwalk
| :six_dof
@type t() :: %QuakeServer.Pmove{ angles: Cauldron3D.Vec.t(), cmd: QuakeServer.Pmove.Command.t(), forward: Cauldron3D.Vec.t(), frametime: float(), gravitydir: Cauldron3D.Vec.t(), groundent: non_neg_integer() | nil, groundplane: Cauldron3D.Vec.t(), jump_held: boolean(), jump_msec: integer(), maxs: Cauldron3D.Vec.t(), mins: Cauldron3D.Vec.t(), movevars: QuakeServer.Pmove.Movevars.t(), onground: boolean(), onladder: boolean(), origin: Cauldron3D.Vec.t(), physents: tuple(), pm_type: pm_type(), right: Cauldron3D.Vec.t(), safeorigin: Cauldron3D.Vec.t(), safeorigin_known: boolean(), server: QuakeServer.Server.t(), touched: [non_neg_integer()], up: Cauldron3D.Vec.t(), velocity: Cauldron3D.Vec.t(), waterjumptime: float(), waterlevel: 0..3, watertype: non_neg_integer() }