Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
step.qc
Go to the documentation of this file.
1#include "step.qh"
2
3void _Movetype_Physics_Step(entity this, float dt) // SV_Physics_Step
4{
5 if(IS_ONGROUND(this))
6 {
7 if(this.velocity_z >= (1.0 / 32.0) && UPWARD_VELOCITY_CLEARS_ONGROUND(this))
8 {
9 UNSET_ONGROUND(this);
10 _Movetype_FlyMove(this, dt, true, false, 0);
11 _Movetype_LinkEdict(this, true);
12 }
13 }
14 else
15 {
16 _Movetype_FlyMove(this, dt, true, false, 0);
17 _Movetype_LinkEdict(this, true);
18
19 // TODO? movetypesteplandevent
20 }
21
23}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
int _Movetype_FlyMove(entity this, float dt, bool applygravity, bool applystepnormal, float stepheight)
Definition movetypes.qc:120
void _Movetype_LinkEdict(entity this, bool touch_triggers)
Definition movetypes.qc:516
void _Movetype_CheckWaterTransition(entity ent)
Definition movetypes.qc:368
#define UPWARD_VELOCITY_CLEARS_ONGROUND(s)
Definition movetypes.qh:34
#define UNSET_ONGROUND(s)
Definition movetypes.qh:18
#define IS_ONGROUND(s)
Definition movetypes.qh:16
void _Movetype_Physics_Step(entity this, float dt)
Definition step.qc:3