FTE's walking movement (sv_phys.c), for walking entities other than players that move
themselves: gravity (WPhys_AddGravity), the water check (WPhys_CheckWater), getting
out of the world when stuck (WPhys_CheckStuck), and the walk itself with stepping up
and down stairs (WPhys_WalkMove), slowed against walls it faces (WPhys_WallFriction).
server = QuakeServer.Physics.Walk.move(server, entity)Steps are QuakeServer.Physics.step_size/1 high; gravity runs along -z.
Summary
Functions
Add a frame of gravity to entity's velocity, scaled by its gravity field (0.5 for a bouncing missile with none).
Leave entity where it is when it is not stuck, remembering the spot in oldorigin;
otherwise move it back there, or failing that to the first free spot up to a step above
and a unit to each side.
Set entity's waterlevel (0 to 3) and watertype from the contents at its feet,
middle and eyes, brush entities included, and its pmove_flags ladder bit from the
contents its box is in; {server, waterlevel > 1}.
Walk entity along its velocity for the frame, stepping up and down stairs.
Functions
@spec add_gravity(QuakeServer.Server.t(), non_neg_integer()) :: QuakeServer.Server.t()
Add a frame of gravity to entity's velocity, scaled by its gravity field (0.5 for a bouncing missile with none).
@spec check_stuck(QuakeServer.Server.t(), non_neg_integer()) :: QuakeServer.Server.t()
Leave entity where it is when it is not stuck, remembering the spot in oldorigin;
otherwise move it back there, or failing that to the first free spot up to a step above
and a unit to each side.
@spec check_water(QuakeServer.Server.t(), non_neg_integer()) :: {QuakeServer.Server.t(), boolean()}
Set entity's waterlevel (0 to 3) and watertype from the contents at its feet,
middle and eyes, brush entities included, and its pmove_flags ladder bit from the
contents its box is in; {server, waterlevel > 1}.
@spec move(QuakeServer.Server.t(), non_neg_integer()) :: QuakeServer.Server.t()
Walk entity along its velocity for the frame, stepping up and down stairs.