Xonotic
push.qh File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void _Movetype_Physics_Push (entity this, float dt)
 
 STATIC_INIT (g_pushmove_moved)
 

Variables

IntrusiveList g_pushmove_moved
 
vector moved_from
 
vector moved_fromangles
 

Function Documentation

◆ _Movetype_Physics_Push()

void _Movetype_Physics_Push ( entity  this,
float  dt 
)

Definition at line 201 of file push.qc.

References _Movetype_PushMove(), getthink, ltime, and nextthink.

Referenced by _Movetype_Physics_Frame().

202 {
203  float oldltime = this.ltime;
204  float movetime = dt;
205  if(this.nextthink < this.ltime + dt)
206  {
207  movetime = this.nextthink - this.ltime;
208  if(movetime < 0)
209  movetime = 0;
210  }
211 
212  if(movetime)
213  {
214  // advances this.ltime if not blocked
215  _Movetype_PushMove(this, movetime);
216  }
217 
218  if(this.nextthink > oldltime && this.nextthink <= this.ltime)
219  {
220  this.nextthink = 0;
221  getthink(this)(this);
222  }
223 }
#define getthink(e)
float ltime
Definition: progsdefs.qc:107
float nextthink
Definition: csprogsdefs.qc:121
void _Movetype_PushMove(entity this, float dt)
Definition: push.qc:3
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ STATIC_INIT()

STATIC_INIT ( g_pushmove_moved  )

Definition at line 8 of file push.qh.

References IL_NEW, and ltime.

#define IL_NEW()
IntrusiveList g_pushmove_moved
Definition: push.qh:7

Variable Documentation

◆ g_pushmove_moved

IntrusiveList g_pushmove_moved

Definition at line 7 of file push.qh.

Referenced by _Movetype_PushMove().

◆ moved_from

vector moved_from

Definition at line 5 of file push.qh.

◆ moved_fromangles

vector moved_fromangles

Definition at line 5 of file push.qh.