Xonotic
aim.qh
Go to the documentation of this file.
1 #pragma once
2 /*
3  * Globals and Fields
4  */
5 
9 
10 
11 
14 
15 // lag simulation
16 // upto 5 queued messages
17 .float lag1_time;
18 .float lag1_float1;
19 .float lag1_float2;
20 .entity lag1_entity1;
21 .vector lag1_vec1;
22 .vector lag1_vec2;
23 .vector lag1_vec3;
24 .vector lag1_vec4;
25 
26 .float lag2_time;
27 .float lag2_float1;
28 .float lag2_float2;
29 .entity lag2_entity1;
30 .vector lag2_vec1;
31 .vector lag2_vec2;
32 .vector lag2_vec3;
33 .vector lag2_vec4;
34 
35 .float lag3_time;
36 .float lag3_float1;
37 .float lag3_float2;
38 .entity lag3_entity1;
39 .vector lag3_vec1;
40 .vector lag3_vec2;
41 .vector lag3_vec3;
42 .vector lag3_vec4;
43 
44 .float lag4_time;
45 .float lag4_float1;
46 .float lag4_float2;
47 .entity lag4_entity1;
48 .vector lag4_vec1;
49 .vector lag4_vec2;
50 .vector lag4_vec3;
51 .vector lag4_vec4;
52 
53 .float lag5_time;
54 .float lag5_float1;
55 .float lag5_float2;
56 .entity lag5_entity1;
57 .vector lag5_vec1;
58 .vector lag5_vec2;
59 .vector lag5_vec3;
60 .vector lag5_vec4;
61 
68 
69 .vector bot_mouseaim;
77 
78 //.vector bot_aimorigin;
79 //.vector bot_aimvelocity;
82 
83 .entity bot_aimtarg;
84 
85 /*
86  * Functions
87  */
88 
89 float lag_additem(entity this, float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4);
90 void lag_update(entity this);
91 void bot_lagfunc(entity this, float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4);
92 
93 float bot_shouldattack(entity this, entity targ);
94 void bot_aimdir(entity this, vector v, float maxfiredeviation);
95 bool bot_aim(entity this, .entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, bool applygravity);
96 void bot_aim_reset(entity this);
97 float findtrajectorywithleading(vector org, vector m1, vector m2, entity targ, float shotspeed, float shotspeedupward, float maxtime, float shotdelay, entity ignore);
98 
99 vector bot_shotlead(vector targorigin, vector targvelocity, float shotspeed, float shotdelay);
100 
101 .void(entity this, float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4) lag_func;
void bot_lagfunc(entity this, float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4)
Definition: aim.qc:151
vector shotorg
Definition: aim.qh:12
vector bot_aimtargorigin
Definition: aim.qh:80
float bot_prevaimtime
Definition: aim.qh:65
vector lag4_vec3
Definition: aim.qh:50
vector bot_1st_order_aimfilter
Definition: aim.qh:71
vector lag4_vec2
Definition: aim.qh:49
float lag1_float2
Definition: aim.qh:19
float bot_aimthinktime
Definition: aim.qh:64
vector lag1_vec3
Definition: aim.qh:23
entity lag4_entity1
Definition: aim.qh:47
float lag5_float1
Definition: aim.qh:54
vector findtrajectory_velocity
Definition: aim.qh:8
float lag_additem(entity this, float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4)
Definition: aim.qc:101
vector lag1_vec4
Definition: aim.qh:24
entity lag3_entity1
Definition: aim.qh:38
float lag5_float2
Definition: aim.qh:55
bool bot_aim(entity this,.entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, bool applygravity)
Definition: aim.qc:363
entity() spawn
vector bot_5th_order_aimfilter
Definition: aim.qh:75
float lag2_time
Definition: aim.qh:26
vector bot_4th_order_aimfilter
Definition: aim.qh:74
float bot_shouldattack(entity this, entity targ)
Definition: aim.qc:112
float bot_aimlatency
Definition: aim.qh:67
void bot_aim_reset(entity this)
Definition: aim.qc:170
entity bot_aimtarg
Definition: aim.qh:83
vector bot_badaimoffset
Definition: aim.qh:70
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1
Definition: all.inc:654
vector lag3_vec3
Definition: aim.qh:41
entity lag1_entity1
Definition: aim.qh:20
vector bot_aimtargvelocity
Definition: aim.qh:81
float lag4_float1
Definition: aim.qh:45
vector lag5_vec3
Definition: aim.qh:59
entity tracetossent
Definition: aim.qh:6
vector lag2_vec1
Definition: aim.qh:30
entity tracetossfaketarget
Definition: aim.qh:7
spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2 f1 f1points f2
Definition: all.inc:348
float lag3_time
Definition: aim.qh:35
vector bot_3th_order_aimfilter
Definition: aim.qh:73
float bot_firetimer
Definition: aim.qh:66
float lag3_float1
Definition: aim.qh:36
vector lag4_vec4
Definition: aim.qh:51
vector lag1_vec2
Definition: aim.qh:22
vector lag2_vec4
Definition: aim.qh:33
vector lag3_vec4
Definition: aim.qh:42
float lag1_float1
Definition: aim.qh:18
float lag2_float2
Definition: aim.qh:28
float lag4_time
Definition: aim.qh:44
float bot_badaimtime
Definition: aim.qh:63
vector(float skel, float bonenum) _skel_get_boneabs_hidden
bool bot_aimdir_executed
Definition: aim.qh:62
vector lag5_vec2
Definition: aim.qh:58
vector lag2_vec3
Definition: aim.qh:32
vector bot_2nd_order_aimfilter
Definition: aim.qh:72
float lag5_time
Definition: aim.qh:53
vector bot_mouseaim
Definition: aim.qh:69
vector v
Definition: ent_cs.qc:116
void lag_update(entity this)
Definition: aim.qc:92
vector lag5_vec4
Definition: aim.qh:60
float lag3_float2
Definition: aim.qh:37
vector lag3_vec1
Definition: aim.qh:39
vector lag2_vec2
Definition: aim.qh:31
void bot_aimdir(entity this, vector v, float maxfiredeviation)
Definition: aim.qc:186
vector shotdir
Definition: aim.qh:13
vector lag5_vec1
Definition: aim.qh:57
float lag1_time
Definition: aim.qh:17
float findtrajectorywithleading(vector org, vector m1, vector m2, entity targ, float shotspeed, float shotspeedupward, float maxtime, float shotdelay, entity ignore)
Definition: aim.qc:16
vector bot_olddesiredang
Definition: aim.qh:76
vector lag1_vec1
Definition: aim.qh:21
vector lag3_vec2
Definition: aim.qh:40
float lag2_float1
Definition: aim.qh:27
entity lag2_entity1
Definition: aim.qh:29
entity lag5_entity1
Definition: aim.qh:56
vector lag4_vec1
Definition: aim.qh:48
float lag4_float2
Definition: aim.qh:46
vector bot_shotlead(vector targorigin, vector targvelocity, float shotspeed, float shotdelay)
Definition: aim.qc:357