Xonotic
step.qc
Go to the documentation of this file.
1 #include "step.qh"
2 
3 void _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);
11  _Movetype_FlyMove(this, dt, true, false, 0);
12  _Movetype_LinkEdict(this, true);
13  }
14  }
15  else
16  {
18  _Movetype_FlyMove(this, dt, true, false, 0);
19  _Movetype_LinkEdict(this, true);
20 
21  // TODO? movetypesteplandevent
22  }
23 
25 }
#define UPWARD_VELOCITY_CLEARS_ONGROUND(s)
Definition: movetypes.qh:34
entity() spawn
#define IS_ONGROUND(s)
Definition: movetypes.qh:16
#define UNSET_ONGROUND(s)
Definition: movetypes.qh:18
void _Movetype_CheckWaterTransition(entity ent)
Definition: movetypes.qc:379
void _Movetype_Physics_Step(entity this, float dt)
Definition: step.qc:3
void _Movetype_LinkEdict(entity this, bool touch_triggers)
Definition: movetypes.qc:512
int _Movetype_FlyMove(entity this, float dt, bool applygravity, bool applystepnormal, float stepheight)
Definition: movetypes.qc:124
void _Movetype_CheckVelocity(entity this)
Definition: movetypes.qc:339