One physics frame of a level, as FTE's server runs it (sv_phys.c): the program's
StartFrame, then every entity by its move type (WPhys_RunEntity), then EndFrame,
and the clock moved on by the frame.
server = QuakeServer.Physics.frame(server)The program's time is the frame's start for everything run in it, and its end for
EndFrame. An entity whose customphysics holds a function has that run instead of
its move type. A player whose commands the program runs itself
(QuakeServer.Physics.Command) is left out: its commands move it. Any other player
runs its command (QuakeServer.Player), then PlayerPreThink, its move, and
PlayerPostThink. After each entity, the missile it may have spawned (newmis) runs
at once, for a twentieth of a second.
Summary
Functions
Bound entity's velocity to the length sv_maxvelocity (WPhys_CheckVelocity).
Run server's entities for one frame of server.frametime seconds and move its clock on.
Run the touches of two entities that have met, from trace.
Mark player entity as running its own commands.
Whether player entity runs its own commands (QuakeServer.Physics.Command), so a frame leaves it out.
Run entity for the frame by its move type (WPhys_RunEntity).
Run the missile the program last spawned (newmis), for a twentieth of a second, and clear newmis.
The height of a step, FTE's movevars.stepheight: the cvar pm_stepheight, or 18 while it is empty.
Run entity's think if it is due before the frame ends, at the time it was due (the
frame's start when that has passed), again while it sets a later nextthink still due
this frame and the cvar sv_gameplayfix_multiplethinks is on (WPhys_RunThink).
Returns {server, still_there?}.
Functions
@spec check_velocity(QuakeServer.Server.t(), non_neg_integer()) :: QuakeServer.Server.t()
Bound entity's velocity to the length sv_maxvelocity (WPhys_CheckVelocity).
@spec frame(QuakeServer.Server.t()) :: QuakeServer.Server.t()
Run server's entities for one frame of server.frametime seconds and move its clock on.
@spec impact(QuakeServer.Server.t(), non_neg_integer(), map()) :: QuakeServer.Server.t()
Run the touches of two entities that have met, from trace.
@spec independent(QuakeServer.Server.t(), non_neg_integer()) :: QuakeServer.Server.t()
Mark player entity as running its own commands.
@spec independent?(QuakeServer.Server.t(), non_neg_integer()) :: boolean()
Whether player entity runs its own commands (QuakeServer.Physics.Command), so a frame leaves it out.
@spec run_entity(QuakeServer.Server.t(), non_neg_integer()) :: QuakeServer.Server.t()
Run entity for the frame by its move type (WPhys_RunEntity).
@spec run_newmis(QuakeServer.Server.t()) :: QuakeServer.Server.t()
Run the missile the program last spawned (newmis), for a twentieth of a second, and clear newmis.
@spec step_size(QuakeServer.Server.t()) :: float()
The height of a step, FTE's movevars.stepheight: the cvar pm_stepheight, or 18 while it is empty.
@spec think(QuakeServer.Server.t(), non_neg_integer()) :: {QuakeServer.Server.t(), boolean()}
Run entity's think if it is due before the frame ends, at the time it was due (the
frame's start when that has passed), again while it sets a later nextthink still due
this frame and the cvar sv_gameplayfix_multiplethinks is on (WPhys_RunThink).
Returns {server, still_there?}.