Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
vehicles.qh File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

float vehicle_altitude (entity this, float amax)
vector vehicles_force_fromtag_hover (entity this, string tag_name, float spring_length, float max_power)
vector vehicles_force_fromtag_maglev (entity this, string tag_name, float spring_length, float max_power)

Variables

float force_fromtag_normpower
vector force_fromtag_origin
float force_fromtag_power

Function Documentation

◆ vehicle_altitude()

float vehicle_altitude ( entity this,
float amax )

Definition at line 4 of file vehicles.qc.

5{
6 tracebox(this.origin, this.mins, this.maxs, this.origin - ('0 0 1' * amax), MOVE_WORLDONLY, this);
7 return vlen(this.origin - trace_endpos);
8}
vector mins
vector trace_endpos
vector maxs
float MOVE_WORLDONLY
vector origin
float vlen(vector v)

References entity(), maxs, mins, MOVE_WORLDONLY, origin, trace_endpos, and vlen().

Referenced by bumblebee_land(), and raptor_land().

◆ vehicles_force_fromtag_hover()

vector vehicles_force_fromtag_hover ( entity this,
string tag_name,
float spring_length,
float max_power )

Definition at line 10 of file vehicles.qc.

11{
12 force_fromtag_origin = gettaginfo(this, gettagindex(this, tag_name));
14 traceline(force_fromtag_origin, force_fromtag_origin - (v_forward * spring_length), MOVE_NORMAL, this);
15
16 force_fromtag_power = (1 - trace_fraction) * max_power;
18
20}
const float MOVE_NORMAL
vector v_forward
float trace_fraction
#define gettagindex
vector normalize(vector v)
#define gettaginfo
Definition post.qh:32
float force_fromtag_power
Definition vehicles.qh:4
vector force_fromtag_origin
Definition vehicles.qh:6
float force_fromtag_normpower
Definition vehicles.qh:5

References entity(), force_fromtag_normpower, force_fromtag_origin, force_fromtag_power, gettagindex, gettaginfo, MOVE_NORMAL, normalize(), trace_fraction, v_forward, and vector.

◆ vehicles_force_fromtag_maglev()

vector vehicles_force_fromtag_maglev ( entity this,
string tag_name,
float spring_length,
float max_power )

Definition at line 22 of file vehicles.qc.

23{
24 force_fromtag_origin = gettaginfo(this, gettagindex(this, tag_name));
26 traceline(force_fromtag_origin, force_fromtag_origin - (v_forward * spring_length), MOVE_NORMAL, this);
27
28 // TODO - this may NOT be compatible with wall/celing movement, unhardcode 0.25 (engine count multiplier)
29 if(trace_fraction == 1.0)
30 {
32 return '0 0 -200';
33 }
34
37
39}

References entity(), force_fromtag_normpower, force_fromtag_origin, force_fromtag_power, gettagindex, gettaginfo, MOVE_NORMAL, normalize(), trace_fraction, v_forward, and vector.

Variable Documentation

◆ force_fromtag_normpower

float force_fromtag_normpower

◆ force_fromtag_origin

vector force_fromtag_origin

Definition at line 6 of file vehicles.qh.

Referenced by vehicles_force_fromtag_hover(), and vehicles_force_fromtag_maglev().

◆ force_fromtag_power

float force_fromtag_power

Definition at line 4 of file vehicles.qh.

Referenced by vehicles_force_fromtag_hover(), and vehicles_force_fromtag_maglev().