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

Go to the source code of this file.

Functions

bool bot_aim (entity this,.entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, bool applygravity)
 
void bot_aim_reset (entity this)
 
void bot_aimdir (entity this, vector v, float maxfiredeviation)
 
void bot_lagfunc (entity this, float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4)
 
vector bot_shotlead (vector targorigin, vector targvelocity, float shotspeed, float shotdelay)
 
float bot_shouldattack (entity this, entity targ)
 
float findtrajectorywithleading (vector org, vector m1, vector m2, entity targ, float shotspeed, float shotspeedupward, float maxtime, float shotdelay, entity ignore)
 
float lag_additem (entity this, float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4)
 
void lag_update (entity this)
 
 void (entity this, float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4) lag_func
 

Variables

vector bot_1st_order_aimfilter
 
vector bot_2nd_order_aimfilter
 
vector bot_3th_order_aimfilter
 
vector bot_4th_order_aimfilter
 
vector bot_5th_order_aimfilter
 
bool bot_aimdir_executed
 
float bot_aimlatency
 
entity bot_aimtarg
 
vector bot_aimtargorigin
 
vector bot_aimtargvelocity
 
float bot_aimthinktime
 
vector bot_badaimoffset
 
float bot_badaimtime
 
float bot_firetimer
 
vector bot_mouseaim
 
vector bot_olddesiredang
 
float bot_prevaimtime
 
vector findtrajectory_velocity
 
entity lag1_entity1
 
float lag1_float1
 
float lag1_float2
 
float lag1_time
 
vector lag1_vec1
 
vector lag1_vec2
 
vector lag1_vec3
 
vector lag1_vec4
 
entity lag2_entity1
 
float lag2_float1
 
float lag2_float2
 
float lag2_time
 
vector lag2_vec1
 
vector lag2_vec2
 
vector lag2_vec3
 
vector lag2_vec4
 
entity lag3_entity1
 
float lag3_float1
 
float lag3_float2
 
float lag3_time
 
vector lag3_vec1
 
vector lag3_vec2
 
vector lag3_vec3
 
vector lag3_vec4
 
entity lag4_entity1
 
float lag4_float1
 
float lag4_float2
 
float lag4_time
 
vector lag4_vec1
 
vector lag4_vec2
 
vector lag4_vec3
 
vector lag4_vec4
 
entity lag5_entity1
 
float lag5_float1
 
float lag5_float2
 
float lag5_time
 
vector lag5_vec1
 
vector lag5_vec2
 
vector lag5_vec3
 
vector lag5_vec4
 
vector shotdir
 
vector shotorg
 
entity tracetossent
 
entity tracetossfaketarget
 

Function Documentation

◆ bot_aim()

bool bot_aim ( entity  this,
.entity  weaponentity,
float  shotspeed,
float  shotspeedupward,
float  maxshottime,
bool  applygravity 
)

Definition at line 363 of file aim.qc.

References autocvar_bot_ai_aimskill_firetolerance_distdegrees, autocvar_bot_ai_aimskill_firetolerance_maxdegrees, autocvar_bot_ai_aimskill_firetolerance_mindegrees, bot_aimdir(), bot_aimlatency, bot_aimtarg, bot_aimtargorigin, bot_aimtargvelocity, bot_firetimer, bot_shotlead(), bot_shouldattack(), bound(), DPCONTENTS_BODY, DPCONTENTS_CORPSE, DPCONTENTS_SOLID, dphitcontentsmask, enemy, findtrajectory_velocity, findtrajectorywithleading(), LOG_TRACE, makevectors, origin, shotdir, shotorg, skill, sqrt(), time, trace_ent, trace_fraction, v, v_angle, v_forward, vector(), view_ofs, vlen(), and W_WeaponSpeedFactor().

364 {
365  float r, hf, distanceratio;
366  vector v;
367  hf = this.dphitcontentsmask;
369 
370  float speed_factor = W_WeaponSpeedFactor(this);
371  shotspeed *= speed_factor;
372  shotspeedupward *= speed_factor;
373  if (!shotspeed)
374  {
375  LOG_TRACE("bot_aim: WARNING: weapon ", this.(weaponentity).m_weapon.m_name, " shotspeed is zero!");
376  shotspeed = 1000000;
377  }
378  if (!maxshottime)
379  {
380  LOG_TRACE("bot_aim: WARNING: weapon ", this.(weaponentity).m_weapon.m_name, " maxshottime is zero!");
381  maxshottime = 1;
382  }
383  makevectors(this.v_angle);
384  shotorg = this.origin + this.view_ofs;
385  shotdir = v_forward;
386  v = bot_shotlead(this.bot_aimtargorigin, this.bot_aimtargvelocity, shotspeed, this.bot_aimlatency);
387  distanceratio = sqrt(bound(0,skill,10000))*0.3*(vlen(v-shotorg)-100)/autocvar_bot_ai_aimskill_firetolerance_distdegrees;
388  distanceratio = bound(0,distanceratio,1);
391  if (applygravity && this.bot_aimtarg)
392  {
393  if (!findtrajectorywithleading(shotorg, '0 0 0', '0 0 0', this.bot_aimtarg, shotspeed, shotspeedupward, maxshottime, 0, this))
394  {
395  this.dphitcontentsmask = hf;
396  return false;
397  }
398 
399  bot_aimdir(this, findtrajectory_velocity - shotspeedupward * '0 0 1', r);
400  }
401  else
402  {
403  bot_aimdir(this, v - shotorg, r);
404  //dprint("AIM: ");dprint(vtos(this.bot_aimtargorigin));dprint(" + ");dprint(vtos(this.bot_aimtargvelocity));dprint(" * ");dprint(ftos(this.bot_aimlatency + vlen(this.bot_aimtargorigin - shotorg) / shotspeed));dprint(" = ");dprint(vtos(v));dprint(" : aimdir = ");dprint(vtos(normalize(v - shotorg)));dprint(" : ");dprint(vtos(shotdir));dprint("\n");
405  //traceline(shotorg, shotorg + shotdir * 10000, false, this);
406  //if (trace_ent.takedamage)
407  //if (trace_fraction < 1)
408  //if (!bot_shouldattack(this, trace_ent))
409  // return false;
410  traceline(shotorg, this.bot_aimtargorigin, false, this);
411  if (trace_fraction < 1)
412  if (trace_ent != this.enemy)
413  if (!bot_shouldattack(this, trace_ent))
414  {
415  this.dphitcontentsmask = hf;
416  return false;
417  }
418  }
419 
420  if (time > this.bot_firetimer)
421  {
422  this.dphitcontentsmask = hf;
423  return false;
424  }
425 
426  //if (r > maxshottime * shotspeed)
427  // return false;
428  this.dphitcontentsmask = hf;
429  return true;
430 }
vector shotorg
Definition: aim.qh:12
vector bot_aimtargorigin
Definition: aim.qh:80
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 view_ofs
Definition: progsdefs.qc:151
vector findtrajectory_velocity
Definition: aim.qh:8
float autocvar_bot_ai_aimskill_firetolerance_mindegrees
Definition: cvars.qh:7
void bot_aimdir(entity this, vector v, float maxfiredeviation)
Definition: aim.qc:186
bool bot_shouldattack(entity this, entity targ)
Definition: aim.qc:112
vector v_angle
Definition: progsdefs.qc:161
float skill
Definition: api.qh:35
float bot_aimlatency
Definition: aim.qh:67
float autocvar_bot_ai_aimskill_firetolerance_distdegrees
Definition: cvars.qh:5
entity bot_aimtarg
Definition: aim.qh:83
origin
Definition: ent_cs.qc:114
entity trace_ent
Definition: csprogsdefs.qc:40
vector bot_aimtargvelocity
Definition: aim.qh:81
entity enemy
Definition: sv_ctf.qh:143
float bot_firetimer
Definition: aim.qh:66
float autocvar_bot_ai_aimskill_firetolerance_maxdegrees
Definition: cvars.qh:6
float DPCONTENTS_SOLID
vector(float skel, float bonenum) _skel_get_boneabs_hidden
vector v
Definition: ent_cs.qc:116
float DPCONTENTS_BODY
#define LOG_TRACE(...)
Definition: log.qh:81
float W_WeaponSpeedFactor(entity this)
Definition: weaponsystem.qc:45
vector bot_shotlead(vector targorigin, vector targvelocity, float shotspeed, float shotdelay)
Definition: aim.qc:357
float dphitcontentsmask
vector shotdir
Definition: aim.qh:13
float time
Definition: csprogsdefs.qc:16
#define makevectors
Definition: post.qh:21
float trace_fraction
Definition: csprogsdefs.qc:36
float DPCONTENTS_CORPSE
vector v_forward
Definition: csprogsdefs.qc:31
+ Here is the call graph for this function:

◆ bot_aim_reset()

void bot_aim_reset ( entity  this)

Definition at line 170 of file aim.qc.

References bot_1st_order_aimfilter, bot_2nd_order_aimfilter, bot_3th_order_aimfilter, bot_4th_order_aimfilter, bot_5th_order_aimfilter, bot_aimdir_executed, bot_aimthinktime, bot_badaimtime, bot_firetimer, bot_mouseaim, bot_olddesiredang, bot_prevaimtime, time, and v_angle.

171 {
172  this.bot_mouseaim = this.v_angle;
173  this.bot_olddesiredang = this.v_angle;
174  this.bot_aimdir_executed = true;
175  this.bot_badaimtime = 0;
176  this.bot_aimthinktime = time;
177  this.bot_prevaimtime = time;
178  this.bot_1st_order_aimfilter = '0 0 0';
179  this.bot_2nd_order_aimfilter = '0 0 0';
180  this.bot_3th_order_aimfilter = '0 0 0';
181  this.bot_4th_order_aimfilter = '0 0 0';
182  this.bot_5th_order_aimfilter = '0 0 0';
183  this.bot_firetimer = 0;
184 }
float bot_prevaimtime
Definition: aim.qh:65
vector bot_1st_order_aimfilter
Definition: aim.qh:71
float bot_aimthinktime
Definition: aim.qh:64
vector bot_5th_order_aimfilter
Definition: aim.qh:75
vector bot_4th_order_aimfilter
Definition: aim.qh:74
vector v_angle
Definition: progsdefs.qc:161
vector bot_3th_order_aimfilter
Definition: aim.qh:73
float bot_firetimer
Definition: aim.qh:66
float bot_badaimtime
Definition: aim.qh:63
bool bot_aimdir_executed
Definition: aim.qh:62
vector bot_2nd_order_aimfilter
Definition: aim.qh:72
vector bot_mouseaim
Definition: aim.qh:69
float time
Definition: csprogsdefs.qc:16
vector bot_olddesiredang
Definition: aim.qh:76

◆ bot_aimdir()

void bot_aimdir ( entity  this,
vector  v,
float  maxfiredeviation 
)

Definition at line 186 of file aim.qc.

References autocvar_bot_ai_aimskill_blendrate, autocvar_bot_ai_aimskill_firetolerance, autocvar_bot_ai_aimskill_fixedrate, autocvar_bot_ai_aimskill_mouse, autocvar_bot_ai_aimskill_offset, autocvar_bot_ai_aimskill_order_filter_1st, autocvar_bot_ai_aimskill_order_filter_2nd, autocvar_bot_ai_aimskill_order_filter_3th, autocvar_bot_ai_aimskill_order_filter_4th, autocvar_bot_ai_aimskill_order_filter_5th, autocvar_bot_ai_aimskill_order_mix_1st, autocvar_bot_ai_aimskill_order_mix_2nd, autocvar_bot_ai_aimskill_order_mix_3th, autocvar_bot_ai_aimskill_order_mix_4th, autocvar_bot_ai_aimskill_order_mix_5th, autocvar_bot_ai_aimskill_think, bot_1st_order_aimfilter, bot_2nd_order_aimfilter, bot_3th_order_aimfilter, bot_4th_order_aimfilter, bot_5th_order_aimfilter, bot_aggresskill, bot_aimdir_executed, bot_aimskill, bot_aimtarg, bot_aimthinktime, bot_badaimoffset, bot_badaimtime, bot_firetimer, bot_mouseaim, bot_mouseskill, bot_offsetskill, bot_olddesiredang, bot_prevaimtime, bot_thinkskill, bound(), cos(), DEG2RAD, floor(), makevectors, max(), normalize(), NULL, origin, random(), randomvec(), shotdir, shotorg, skill, time, trace_endpos, v_angle, v_forward, vdist, vectoangles(), vector(), view_ofs, and vlen().

Referenced by bot_aim(), havocbot_ai(), havocbot_moveto(), and havocbot_movetogoal().

187 {
188  float dist, delta_t, blend;
189  vector desiredang, diffang;
190 
191  this.bot_aimdir_executed = true;
192 
193  //dprint("aim ", this.netname, ": old:", vtos(this.v_angle));
194  // make sure v_angle is sane first
195  this.v_angle_y = this.v_angle.y - floor(this.v_angle.y / 360) * 360;
196  this.v_angle_z = 0;
197 
198  // make work bot_aim_reset even if called before this function
199  if (this.bot_prevaimtime == time)
200  return;
201 
202  // invalid aim dir (can happen when bot overlaps target)
203  if(!v) return;
204 
205  float skill_save = skill;
206  // allow turning in a more natural way when bot is walking
207  if (!this.bot_aimtarg)
208  skill = max(4, skill);
209 
210  // get the desired angles to aim at
211  //dprint(" at:", vtos(v));
212  v = normalize(v);
213  //te_lightning2(NULL, this.origin + this.view_ofs, this.origin + this.view_ofs + v * 200);
214  if (time >= this.bot_badaimtime)
215  {
216  this.bot_badaimtime = max(this.bot_badaimtime + 0.3, time);
218  }
219  desiredang = vectoangles(v) + this.bot_badaimoffset;
220  //dprint(" desired:", vtos(desiredang));
221  if (desiredang.x >= 180)
222  desiredang.x = desiredang.x - 360;
223  desiredang.x = bound(-90, 0 - desiredang.x, 90);
224  desiredang.z = this.v_angle.z;
225  //dprint(" / ", vtos(desiredang));
226 
228  //if (this.bot_painintensity)
229  //{
230  // // shake from pain
231  // desiredang = desiredang + randomvec() * this.bot_painintensity * 0.2;
232  //}
233 
234  // calculate turn angles
235  diffang = (desiredang - this.bot_olddesiredang);
236  // wrap yaw turn
237  diffang.y = diffang.y - floor(diffang.y / 360) * 360;
238  if (diffang.y >= 180)
239  diffang.y = diffang.y - 360;
240  this.bot_olddesiredang = desiredang;
241  //dprint(" diff:", vtos(diffang));
242 
243  delta_t = time-this.bot_prevaimtime;
244  this.bot_prevaimtime = time;
245  // Here we will try to anticipate the comming aiming direction
247  + (diffang * (1 / delta_t) - this.bot_1st_order_aimfilter) * bound(0, autocvar_bot_ai_aimskill_order_filter_1st,1);
256 
257  //blend = (bound(0,skill,10)*0.1)*((1-bound(0,skill,10)*0.05) ** 2.5)*5.656854249; //Plot formule before changing !
258  blend = bound(0,skill+this.bot_aimskill,10)*0.1;
259  desiredang = desiredang + blend *
260  (
266  );
267  desiredang.x = bound(-90, desiredang.x, 90);
268 
269  // calculate turn angles
270  diffang = desiredang - this.bot_mouseaim;
271  // wrap yaw turn
272  diffang.y = diffang.y - floor(diffang.y / 360) * 360;
273  if (diffang.y >= 180)
274  diffang.y = diffang.y - 360;
275  //dprint(" diff:", vtos(diffang));
276 
277  if (time >= this.bot_aimthinktime)
278  {
279  this.bot_aimthinktime = max(this.bot_aimthinktime + 0.5 - 0.05*(skill+this.bot_thinkskill), time);
280  this.bot_mouseaim = this.bot_mouseaim + diffang * (1-random()*0.1*bound(1,10-(skill+this.bot_thinkskill),10));
281  }
282 
283  //this.v_angle = this.v_angle + diffang * bound(0, r * frametime * (skill * 0.5 + 2), 1);
284 
285  diffang = this.bot_mouseaim - desiredang;
286  // wrap yaw turn
287  diffang.y = diffang.y - floor(diffang.y / 360) * 360;
288  if (diffang.y >= 180)
289  diffang.y = diffang.y - 360;
290  desiredang = desiredang + diffang * bound(0,autocvar_bot_ai_aimskill_think,1);
291 
292  // calculate turn angles
293  diffang = desiredang - this.v_angle;
294  // wrap yaw turn
295  diffang.y = diffang.y - floor(diffang.y / 360) * 360;
296  if (diffang.y >= 180)
297  diffang.y = diffang.y - 360;
298  //dprint(" diff:", vtos(diffang));
299 
300  // jitter tracking
301  dist = vlen(diffang);
302  //diffang = diffang + randomvec() * (dist * 0.05 * (3.5 - bound(0, skill, 3)));
303 
304  // turn
305  float r, fixedrate, blendrate;
306  fixedrate = autocvar_bot_ai_aimskill_fixedrate / bound(1,dist,1000);
308  r = max(fixedrate, blendrate);
309  //this.v_angle = this.v_angle + diffang * bound(frametime, r * frametime * (2+skill*skill*0.05-random()*0.05*(10-skill)), 1);
310  r = bound(delta_t, r * delta_t * (2 + ((skill + this.bot_mouseskill) ** 3) * 0.005 - random()), 1);
311  this.v_angle += diffang * (r + (1 - r) * bound(0, 1 - autocvar_bot_ai_aimskill_mouse, 1));
312 
313  this.v_angle_z = 0;
314  this.v_angle_y = this.v_angle.y - floor(this.v_angle.y / 360) * 360;
315  //dprint(" turn:", vtos(this.v_angle));
316 
317  makevectors(this.v_angle);
318  shotorg = this.origin + this.view_ofs;
319  shotdir = v_forward;
320 
321  //dprint(" dir:", vtos(v_forward));
322  //te_lightning2(NULL, shotorg, shotorg + shotdir * 100);
323 
324  // calculate turn angles again
325  //diffang = desiredang - this.v_angle;
326  //diffang_y = diffang_y - floor(diffang_y / 360) * 360;
327  //if (diffang_y >= 180)
328  // diffang_y = diffang_y - 360;
329 
330  skill = skill_save;
331 
332  //dprint("e ", vtos(diffang), " < ", ftos(maxfiredeviation), "\n");
333 
334  if (maxfiredeviation <= 0)
335  return;
336 
338  {
339  this.bot_firetimer = time + 0.2;
340  return;
341  }
342 
343  // decide whether to fire this time
344  if (v * shotdir > cos(maxfiredeviation * DEG2RAD))
345  {
346  traceline(shotorg, shotorg + shotdir * 1000, false, NULL);
347  if (vdist(trace_endpos - shotorg, <, 500 + 500 * bound(0, skill + this.bot_aggresskill, 10))
348  || random() * random() > bound(0, (skill + this.bot_aggresskill) * 0.05, 1))
349  {
350  this.bot_firetimer = time + bound(0.1, 0.5 - (skill + this.bot_aggresskill) * 0.05, 0.5);
351  }
352  }
353  //dprint(ftos(maxfiredeviation),"\n");
354  //dprint(" diff:", vtos(diffang), "\n");
355 }
vector shotorg
Definition: aim.qh:12
float bot_prevaimtime
Definition: aim.qh:65
vector bot_1st_order_aimfilter
Definition: aim.qh:71
float DEG2RAD
Definition: csprogsdefs.qc:961
float bot_aimthinktime
Definition: aim.qh:64
float autocvar_bot_ai_aimskill_order_mix_4th
Definition: cvars.qh:19
float autocvar_bot_ai_aimskill_order_mix_1st
Definition: cvars.qh:16
vector view_ofs
Definition: progsdefs.qc:151
float autocvar_bot_ai_aimskill_blendrate
Definition: cvars.qh:3
float autocvar_bot_ai_aimskill_order_filter_5th
Definition: cvars.qh:15
float autocvar_bot_ai_aimskill_order_mix_5th
Definition: cvars.qh:20
float autocvar_bot_ai_aimskill_offset
Definition: cvars.qh:10
float autocvar_bot_ai_aimskill_order_mix_2nd
Definition: cvars.qh:17
float autocvar_bot_ai_aimskill_mouse
Definition: cvars.qh:9
float bot_thinkskill
Definition: bot.qh:39
float bot_aggresskill
Definition: bot.qh:32
vector bot_5th_order_aimfilter
Definition: aim.qh:75
vector bot_4th_order_aimfilter
Definition: aim.qh:74
vector v_angle
Definition: progsdefs.qc:161
float skill
Definition: api.qh:35
float autocvar_bot_ai_aimskill_order_filter_3th
Definition: cvars.qh:13
int autocvar_bot_ai_aimskill_firetolerance
Definition: cvars.qh:4
entity bot_aimtarg
Definition: aim.qh:83
origin
Definition: ent_cs.qc:114
vector bot_badaimoffset
Definition: aim.qh:70
float autocvar_bot_ai_aimskill_order_mix_3th
Definition: cvars.qh:18
float autocvar_bot_ai_aimskill_fixedrate
Definition: cvars.qh:8
vector bot_3th_order_aimfilter
Definition: aim.qh:73
float bot_firetimer
Definition: aim.qh:66
float autocvar_bot_ai_aimskill_order_filter_4th
Definition: cvars.qh:14
#define NULL
Definition: post.qh:17
float bot_mouseskill
Definition: bot.qh:37
vector trace_endpos
Definition: csprogsdefs.qc:37
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 bot_2nd_order_aimfilter
Definition: aim.qh:72
float autocvar_bot_ai_aimskill_order_filter_1st
Definition: cvars.qh:11
vector bot_mouseaim
Definition: aim.qh:69
vector v
Definition: ent_cs.qc:116
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
Definition: vector.qh:8
float autocvar_bot_ai_aimskill_order_filter_2nd
Definition: cvars.qh:12
float bot_offsetskill
Definition: bot.qh:36
float bot_aimskill
Definition: bot.qh:35
vector shotdir
Definition: aim.qh:13
float time
Definition: csprogsdefs.qc:16
float autocvar_bot_ai_aimskill_think
Definition: cvars.qh:21
vector bot_olddesiredang
Definition: aim.qh:76
#define makevectors
Definition: post.qh:21
vector v_forward
Definition: csprogsdefs.qc:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bot_lagfunc()

void bot_lagfunc ( entity  this,
float  t,
float  f1,
float  f2,
entity  e1,
vector  v1,
vector  v2,
vector  v3,
vector  v4 
)

Definition at line 151 of file aim.qc.

References bot_aimlatency, bot_aimtarg, bot_aimtargorigin, bot_aimtargvelocity, bot_canfire, CS(), random(), and skill.

Referenced by bot_clientconnect().

152 {
153  this.bot_aimtarg = e1;
154  this.bot_aimlatency = CS(this).ping; // FIXME? Shouldn't this be in the lag item?
155  //this.bot_aimorigin = v1;
156  //this.bot_aimvelocity = v2;
157  this.bot_aimtargorigin = v3;
158  this.bot_aimtargvelocity = v4;
159  if(skill <= 0)
160  this.bot_canfire = (random() < 0.8);
161  else if(skill <= 1)
162  this.bot_canfire = (random() < 0.9);
163  else if(skill <= 2)
164  this.bot_canfire = (random() < 0.95);
165  else
166  this.bot_canfire = 1;
167 }
vector bot_aimtargorigin
Definition: aim.qh:80
ClientState CS(Client this)
Definition: state.qh:47
float skill
Definition: api.qh:35
float bot_aimlatency
Definition: aim.qh:67
entity bot_aimtarg
Definition: aim.qh:83
vector bot_aimtargvelocity
Definition: aim.qh:81
float bot_canfire
Definition: bot.qh:68
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bot_shotlead()

vector bot_shotlead ( vector  targorigin,
vector  targvelocity,
float  shotspeed,
float  shotdelay 
)

Definition at line 357 of file aim.qc.

References shotorg, and vlen().

Referenced by bot_aim().

358 {
359  // Try to add code here that predicts gravity effect here, no clue HOW to though ... well not yet atleast...
360  return targorigin + targvelocity * (shotdelay + vlen(targorigin - shotorg) / shotspeed);
361 }
vector shotorg
Definition: aim.qh:12
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bot_shouldattack()

float bot_shouldattack ( entity  this,
entity  targ 
)

Definition at line 112 of file aim.qc.

References autocvar_bot_ignore_bots, autocvar_bot_typefrag, FL_NOTARGET, IS_BOT_CLIENT, IS_DEAD, MUTATOR_CALLHOOK, PHYS_INPUT_BUTTON_CHAT, and teamplay.

Referenced by bot_aim().

113 {
114  if (targ.team == this.team)
115  {
116  if (targ == this)
117  return false;
118  if (teamplay)
119  if (targ.team != 0)
120  return false;
121  }
122 
123  if(STAT(FROZEN, targ))
124  return false;
125 
126  if(teamplay)
127  {
128  if(targ.team==0)
129  return false;
130  }
131  else if (autocvar_bot_ignore_bots && IS_BOT_CLIENT(targ))
132  return false;
133 
134  if (!targ.takedamage)
135  return false;
136  if (IS_DEAD(targ))
137  return false;
139  return false;
140  if(targ.flags & FL_NOTARGET)
141  return false;
142  if(targ.alpha <= 0.1 && targ.alpha != 0)
143  return false; // invisible via alpha
144 
145  if(MUTATOR_CALLHOOK(BotShouldAttack, this, targ))
146  return false;
147 
148  return true;
149 }
#define PHYS_INPUT_BUTTON_CHAT(s)
Definition: player.qh:155
float teamplay
Definition: progsdefs.qc:31
#define IS_DEAD(s)
Definition: utils.qh:26
bool autocvar_bot_ignore_bots
Definition: cvars.qh:51
#define MUTATOR_CALLHOOK(id,...)
Definition: base.qh:140
#define IS_BOT_CLIENT(v)
want: (IS_CLIENT(v) && !IS_REAL_CLIENT(v))
Definition: utils.qh:15
bool autocvar_bot_typefrag
Definition: cvars.qh:61
float FL_NOTARGET
Definition: progsdefs.qc:238
+ Here is the caller graph for this function:

◆ findtrajectorywithleading()

float findtrajectorywithleading ( vector  org,
vector  m1,
vector  m2,
entity  targ,
float  shotspeed,
float  shotspeedupward,
float  maxtime,
float  shotdelay,
entity  ignore 
)

Definition at line 16 of file aim.qc.

References dir, findtrajectory_velocity, MOVETYPE_NONE, normalize(), set_movetype(), setorigin(), SOLID_BBOX, SOLID_NOT, trace_endpos, trace_ent, tracetossent, tracetossfaketarget, v, vector(), and vlen().

Referenced by bot_aim().

17 {
18  float c, savesolid, shottime;
19  vector dir, end, v, o;
20  if (shotspeed < 1)
21  return false; // could cause division by zero if calculated
22  if (targ.solid < SOLID_BBOX) // SOLID_NOT and SOLID_TRIGGER
23  return false; // could never hit it
24  if (!tracetossent)
26  tracetossent.owner = ignore;
27  setsize(tracetossent, m1, m2);
28  savesolid = targ.solid;
29  targ.solid = SOLID_NOT;
30  o = (targ.absmin + targ.absmax) * 0.5;
31  shottime = ((vlen(o - org) / shotspeed) + shotdelay);
32  v = targ.velocity * shottime + o;
33  tracebox(o, targ.mins, targ.maxs, v, false, targ);
34  v = trace_endpos;
35  end = v + (targ.mins + targ.maxs) * 0.5;
36  if ((vlen(end - org) / shotspeed + 0.2) > maxtime)
37  {
38  // out of range
39  targ.solid = savesolid;
40  return false;
41  }
42 
45  tracetossfaketarget.solid = savesolid;
46  set_movetype(tracetossfaketarget, targ.move_movetype);
47  _setmodel(tracetossfaketarget, targ.model); // no low precision
48  tracetossfaketarget.model = targ.model;
49  tracetossfaketarget.modelindex = targ.modelindex;
50  setsize(tracetossfaketarget, targ.mins, targ.maxs);
52 
53  c = 0;
54  dir = normalize(end - org);
55  while (c < 10) // 10 traces
56  {
57  setorigin(tracetossent, org); // reset
58  tracetossent.velocity = findtrajectory_velocity = normalize(dir) * shotspeed + shotspeedupward * '0 0 1';
59  tracetoss(tracetossent, ignore); // love builtin functions...
60  if (trace_ent == tracetossfaketarget) // done
61  {
62  targ.solid = savesolid;
63 
64  // make it disappear
67  tracetossfaketarget.model = "";
68  tracetossfaketarget.modelindex = 0;
69  // relink to remove it from physics considerations
71 
72  return true;
73  }
74  dir.z = dir.z + 0.1; // aim up a little more
75  c = c + 1;
76  }
77  targ.solid = savesolid;
78 
79  // make it disappear
82  tracetossfaketarget.model = "";
83  tracetossfaketarget.modelindex = 0;
84  // relink to remove it from physics considerations
86 
87  // leave a valid one even if it won't reach
88  findtrajectory_velocity = normalize(end - org) * shotspeed + shotspeedupward * '0 0 1';
89  return false;
90 }
const float SOLID_NOT
Definition: csprogsdefs.qc:244
float MOVETYPE_NONE
Definition: progsdefs.qc:246
vector findtrajectory_velocity
Definition: aim.qh:8
entity trace_ent
Definition: csprogsdefs.qc:40
entity tracetossent
Definition: aim.qh:6
entity tracetossfaketarget
Definition: aim.qh:7
vector trace_endpos
Definition: csprogsdefs.qc:37
vector(float skel, float bonenum) _skel_get_boneabs_hidden
vector v
Definition: ent_cs.qc:116
const float SOLID_BBOX
Definition: csprogsdefs.qc:246
setorigin(ent, v)
int dir
Definition: impulse.qc:89
void set_movetype(entity this, int mt)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lag_additem()

float lag_additem ( entity  this,
float  t,
float  f1,
float  f2,
entity  e1,
vector  v1,
vector  v2,
vector  v3,
vector  v4 
)

Definition at line 101 of file aim.qc.

References f1, f2, lag1_entity1, lag1_float1, lag1_float2, lag1_time, lag1_vec1, lag1_vec2, lag1_vec3, lag1_vec4, lag2_entity1, lag2_float1, lag2_float2, lag2_time, lag2_vec1, lag2_vec2, lag2_vec3, lag2_vec4, lag3_entity1, lag3_float1, lag3_float2, lag3_time, lag3_vec1, lag3_vec2, lag3_vec3, lag3_vec4, lag4_entity1, lag4_float1, lag4_float2, lag4_time, lag4_vec1, lag4_vec2, lag4_vec3, lag4_vec4, lag5_entity1, lag5_float1, lag5_float2, lag5_time, lag5_vec1, lag5_vec2, lag5_vec3, and lag5_vec4.

Referenced by havocbot_aim().

102 {
103  if (this.lag1_time == 0) {this.lag1_time = t;this.lag1_float1 = f1;this.lag1_float2 = f2;this.lag1_entity1 = e1;this.lag1_vec1 = v1;this.lag1_vec2 = v2;this.lag1_vec3 = v3;this.lag1_vec4 = v4;return true;}
104  if (this.lag2_time == 0) {this.lag2_time = t;this.lag2_float1 = f1;this.lag2_float2 = f2;this.lag2_entity1 = e1;this.lag2_vec1 = v1;this.lag2_vec2 = v2;this.lag2_vec3 = v3;this.lag2_vec4 = v4;return true;}
105  if (this.lag3_time == 0) {this.lag3_time = t;this.lag3_float1 = f1;this.lag3_float2 = f2;this.lag3_entity1 = e1;this.lag3_vec1 = v1;this.lag3_vec2 = v2;this.lag3_vec3 = v3;this.lag3_vec4 = v4;return true;}
106  if (this.lag4_time == 0) {this.lag4_time = t;this.lag4_float1 = f1;this.lag4_float2 = f2;this.lag4_entity1 = e1;this.lag4_vec1 = v1;this.lag4_vec2 = v2;this.lag4_vec3 = v3;this.lag4_vec4 = v4;return true;}
107  if (this.lag5_time == 0) {this.lag5_time = t;this.lag5_float1 = f1;this.lag5_float2 = f2;this.lag5_entity1 = e1;this.lag5_vec1 = v1;this.lag5_vec2 = v2;this.lag5_vec3 = v3;this.lag5_vec4 = v4;return true;}
108  // no room for it (what is the best thing to do here??)
109  return false;
110 }
vector lag4_vec3
Definition: aim.qh:50
vector lag4_vec2
Definition: aim.qh:49
float lag1_float2
Definition: aim.qh:19
vector lag1_vec3
Definition: aim.qh:23
entity lag4_entity1
Definition: aim.qh:47
float lag5_float1
Definition: aim.qh:54
vector lag1_vec4
Definition: aim.qh:24
entity lag3_entity1
Definition: aim.qh:38
float lag5_float2
Definition: aim.qh:55
float lag2_time
Definition: aim.qh:26
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
float lag4_float1
Definition: aim.qh:45
vector lag5_vec3
Definition: aim.qh:59
vector lag2_vec1
Definition: aim.qh:30
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
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
vector lag5_vec2
Definition: aim.qh:58
vector lag2_vec3
Definition: aim.qh:32
float lag5_time
Definition: aim.qh:53
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
vector lag5_vec1
Definition: aim.qh:57
float lag1_time
Definition: aim.qh:17
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
+ Here is the caller graph for this function:

◆ lag_update()

void lag_update ( entity  this)

Definition at line 92 of file aim.qc.

References lag1_entity1, lag1_float1, lag1_float2, lag1_time, lag1_vec1, lag1_vec2, lag1_vec3, lag1_vec4, lag2_entity1, lag2_float1, lag2_float2, lag2_time, lag2_vec1, lag2_vec2, lag2_vec3, lag2_vec4, lag3_entity1, lag3_float1, lag3_float2, lag3_time, lag3_vec1, lag3_vec2, lag3_vec3, lag3_vec4, lag4_entity1, lag4_float1, lag4_float2, lag4_time, lag4_vec1, lag4_vec2, lag4_vec3, lag4_vec4, lag5_entity1, lag5_float1, lag5_float2, lag5_time, lag5_vec1, lag5_vec2, lag5_vec3, lag5_vec4, and time.

Referenced by havocbot_ai().

93 {
94  if (this.lag1_time && time > this.lag1_time) { this.lag_func(this, this.lag1_time, this.lag1_float1, this.lag1_float2, this.lag1_entity1, this.lag1_vec1, this.lag1_vec2, this.lag1_vec3, this.lag1_vec4); this.lag1_time = 0; }
95  if (this.lag2_time && time > this.lag2_time) { this.lag_func(this, this.lag2_time, this.lag2_float1, this.lag2_float2, this.lag2_entity1, this.lag2_vec1, this.lag2_vec2, this.lag2_vec3, this.lag2_vec4); this.lag2_time = 0; }
96  if (this.lag3_time && time > this.lag3_time) { this.lag_func(this, this.lag3_time, this.lag3_float1, this.lag3_float2, this.lag3_entity1, this.lag3_vec1, this.lag3_vec2, this.lag3_vec3, this.lag3_vec4); this.lag3_time = 0; }
97  if (this.lag4_time && time > this.lag4_time) { this.lag_func(this, this.lag4_time, this.lag4_float1, this.lag4_float2, this.lag4_entity1, this.lag4_vec1, this.lag4_vec2, this.lag4_vec3, this.lag4_vec4); this.lag4_time = 0; }
98  if (this.lag5_time && time > this.lag5_time) { this.lag_func(this, this.lag5_time, this.lag5_float1, this.lag5_float2, this.lag5_entity1, this.lag5_vec1, this.lag5_vec2, this.lag5_vec3, this.lag5_vec4); this.lag5_time = 0; }
99 }
vector lag4_vec3
Definition: aim.qh:50
vector lag4_vec2
Definition: aim.qh:49
float lag1_float2
Definition: aim.qh:19
vector lag1_vec3
Definition: aim.qh:23
entity lag4_entity1
Definition: aim.qh:47
float lag5_float1
Definition: aim.qh:54
vector lag1_vec4
Definition: aim.qh:24
entity lag3_entity1
Definition: aim.qh:38
float lag5_float2
Definition: aim.qh:55
float lag2_time
Definition: aim.qh:26
vector lag3_vec3
Definition: aim.qh:41
entity lag1_entity1
Definition: aim.qh:20
float lag4_float1
Definition: aim.qh:45
vector lag5_vec3
Definition: aim.qh:59
vector lag2_vec1
Definition: aim.qh:30
float lag3_time
Definition: aim.qh:35
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
vector lag5_vec2
Definition: aim.qh:58
vector lag2_vec3
Definition: aim.qh:32
float lag5_time
Definition: aim.qh:53
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
vector lag5_vec1
Definition: aim.qh:57
float lag1_time
Definition: aim.qh:17
float time
Definition: csprogsdefs.qc:16
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
+ Here is the caller graph for this function:

◆ void()

void ( entity  this,
float  t,
float  f1,
float  f2,
entity  e1,
vector  v1,
vector  v2,
vector  v3,
vector  v4 
)

Variable Documentation

◆ bot_1st_order_aimfilter

vector bot_1st_order_aimfilter

Definition at line 71 of file aim.qh.

Referenced by bot_aim_reset(), and bot_aimdir().

◆ bot_2nd_order_aimfilter

vector bot_2nd_order_aimfilter

Definition at line 72 of file aim.qh.

Referenced by bot_aim_reset(), and bot_aimdir().

◆ bot_3th_order_aimfilter

vector bot_3th_order_aimfilter

Definition at line 73 of file aim.qh.

Referenced by bot_aim_reset(), and bot_aimdir().

◆ bot_4th_order_aimfilter

vector bot_4th_order_aimfilter

Definition at line 74 of file aim.qh.

Referenced by bot_aim_reset(), and bot_aimdir().

◆ bot_5th_order_aimfilter

vector bot_5th_order_aimfilter

Definition at line 75 of file aim.qh.

Referenced by bot_aim_reset(), and bot_aimdir().

◆ bot_aimdir_executed

bool bot_aimdir_executed

Definition at line 62 of file aim.qh.

Referenced by bot_aim_reset(), bot_aimdir(), havocbot_ai(), havocbot_moveto(), and havocbot_movetogoal().

◆ bot_aimlatency

float bot_aimlatency

Definition at line 67 of file aim.qh.

Referenced by bot_aim(), and bot_lagfunc().

◆ bot_aimtarg

entity bot_aimtarg

Definition at line 83 of file aim.qh.

Referenced by bot_aim(), bot_aimdir(), bot_lagfunc(), havocbot_ai(), and havocbot_role_ctf_carrier().

◆ bot_aimtargorigin

vector bot_aimtargorigin

Definition at line 80 of file aim.qh.

Referenced by bot_aim(), and bot_lagfunc().

◆ bot_aimtargvelocity

vector bot_aimtargvelocity

Definition at line 81 of file aim.qh.

Referenced by bot_aim(), and bot_lagfunc().

◆ bot_aimthinktime

float bot_aimthinktime

Definition at line 64 of file aim.qh.

Referenced by bot_aim_reset(), and bot_aimdir().

◆ bot_badaimoffset

vector bot_badaimoffset

Definition at line 70 of file aim.qh.

Referenced by bot_aimdir().

◆ bot_badaimtime

float bot_badaimtime

Definition at line 63 of file aim.qh.

Referenced by bot_aim_reset(), and bot_aimdir().

◆ bot_firetimer

float bot_firetimer

Definition at line 66 of file aim.qh.

Referenced by bot_aim(), bot_aim_reset(), and bot_aimdir().

◆ bot_mouseaim

vector bot_mouseaim

Definition at line 69 of file aim.qh.

Referenced by bot_aim_reset(), and bot_aimdir().

◆ bot_olddesiredang

vector bot_olddesiredang

Definition at line 76 of file aim.qh.

Referenced by bot_aim_reset(), and bot_aimdir().

◆ bot_prevaimtime

float bot_prevaimtime

Definition at line 65 of file aim.qh.

Referenced by bot_aim_reset(), and bot_aimdir().

◆ findtrajectory_velocity

vector findtrajectory_velocity

Definition at line 8 of file aim.qh.

Referenced by bot_aim(), and findtrajectorywithleading().

◆ lag1_entity1

entity lag1_entity1

Definition at line 20 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag1_float1

float lag1_float1

Definition at line 18 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag1_float2

float lag1_float2

Definition at line 19 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag1_time

float lag1_time

Definition at line 17 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag1_vec1

vector lag1_vec1

Definition at line 21 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag1_vec2

vector lag1_vec2

Definition at line 22 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag1_vec3

vector lag1_vec3

Definition at line 23 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag1_vec4

vector lag1_vec4

Definition at line 24 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag2_entity1

entity lag2_entity1

Definition at line 29 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag2_float1

float lag2_float1

Definition at line 27 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag2_float2

float lag2_float2

Definition at line 28 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag2_time

float lag2_time

Definition at line 26 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag2_vec1

vector lag2_vec1

Definition at line 30 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag2_vec2

vector lag2_vec2

Definition at line 31 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag2_vec3

vector lag2_vec3

Definition at line 32 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag2_vec4

vector lag2_vec4

Definition at line 33 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag3_entity1

entity lag3_entity1

Definition at line 38 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag3_float1

float lag3_float1

Definition at line 36 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag3_float2

float lag3_float2

Definition at line 37 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag3_time

float lag3_time

Definition at line 35 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag3_vec1

vector lag3_vec1

Definition at line 39 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag3_vec2

vector lag3_vec2

Definition at line 40 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag3_vec3

vector lag3_vec3

Definition at line 41 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag3_vec4

vector lag3_vec4

Definition at line 42 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag4_entity1

entity lag4_entity1

Definition at line 47 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag4_float1

float lag4_float1

Definition at line 45 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag4_float2

float lag4_float2

Definition at line 46 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag4_time

float lag4_time

Definition at line 44 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag4_vec1

vector lag4_vec1

Definition at line 48 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag4_vec2

vector lag4_vec2

Definition at line 49 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag4_vec3

vector lag4_vec3

Definition at line 50 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag4_vec4

vector lag4_vec4

Definition at line 51 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag5_entity1

entity lag5_entity1

Definition at line 56 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag5_float1

float lag5_float1

Definition at line 54 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag5_float2

float lag5_float2

Definition at line 55 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag5_time

float lag5_time

Definition at line 53 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag5_vec1

vector lag5_vec1

Definition at line 57 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag5_vec2

vector lag5_vec2

Definition at line 58 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag5_vec3

vector lag5_vec3

Definition at line 59 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ lag5_vec4

vector lag5_vec4

Definition at line 60 of file aim.qh.

Referenced by lag_additem(), and lag_update().

◆ shotdir

vector shotdir

Definition at line 13 of file aim.qh.

Referenced by bot_aim(), bot_aimdir(), STATIC_INIT(), and W_Model().

◆ shotorg

vector shotorg

Definition at line 12 of file aim.qh.

Referenced by bot_aim(), bot_aimdir(), bot_shotlead(), STATIC_INIT(), and W_Model().

◆ tracetossent

entity tracetossent

Definition at line 6 of file aim.qh.

Referenced by findtrajectorywithleading().

◆ tracetossfaketarget

entity tracetossfaketarget

Definition at line 7 of file aim.qh.

Referenced by findtrajectorywithleading().