Xonotic
follow.qc File Reference
#include "follow.qh"
+ Include dependency graph for follow.qc:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void _Movetype_Physics_Follow (entity this)
 

Function Documentation

◆ _Movetype_Physics_Follow()

void _Movetype_Physics_Follow ( entity  this)

Definition at line 3 of file follow.qc.

References _Movetype_LinkEdict(), aiment, angles, entity(), makevectors, origin, v, v_angle, vector(), and view_ofs.

Referenced by _Movetype_Physics_ClientFrame(), and _Movetype_Physics_Frame().

4 {
5  entity e = this.aiment;
6 
7  if(e.angles == this.punchangle)
8  {
9  this.origin = e.origin + this.view_ofs;
10  }
11  else
12  {
13  vector ang, v;
14  ang_x = -this.punchangle_x;
15  ang_y = this.punchangle_y;
16  ang_z = this.punchangle_z;
17  makevectors(ang);
18  v_x = this.view_ofs_x * v_forward_x + this.view_ofs_y * v_right_x + this.view_ofs_z * v_up_x;
19  v_y = this.view_ofs_x * v_forward_y + this.view_ofs_y * v_right_y + this.view_ofs_z * v_up_y;
20  v_z = this.view_ofs_x * v_forward_z + this.view_ofs_y * v_right_z + this.view_ofs_z * v_up_z;
21  ang = e.angles;
22  ang_x = -e.angles_x;
23  makevectors(ang);
24  this.origin_x = v_x * v_forward_x + v_y * v_forward_y + v_z * v_forward_z + e.origin_x;
25  this.origin_y = v_x * v_right_x + v_y * v_right_y + v_z * v_right_z + e.origin_y;
26  this.origin_z = v_x * v_up_x + v_y * v_up_y + v_z * v_up_z + e.origin_z;
27  }
28 
29  this.angles = e.angles + this.v_angle;
30  _Movetype_LinkEdict(this, false);
31 }
vector view_ofs
Definition: progsdefs.qc:151
entity() spawn
vector v_angle
Definition: progsdefs.qc:161
origin
Definition: ent_cs.qc:114
void _Movetype_LinkEdict(entity this, bool touch_triggers)
Definition: movetypes.qc:512
vector(float skel, float bonenum) _skel_get_boneabs_hidden
vector v
Definition: ent_cs.qc:116
entity aiment
Definition: movetypes.qh:90
vector angles
Definition: csprogsdefs.qc:104
#define makevectors
Definition: post.qh:21
+ Here is the call graph for this function:
+ Here is the caller graph for this function: