Xonotic
|
#include "aim.qh"
#include <common/physics/player.qh>
#include <common/state.qh>
#include <common/stats.qh>
#include <common/weapons/_all.qh>
#include <server/bot/default/bot.qh>
#include <server/bot/default/cvars.qh>
#include <server/mutators/_mod.qh>
#include <server/weapons/weaponsystem.qh>
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) |
bool | 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) |
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().
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.
Referenced by MUTATOR_HOOKFUNCTION(), ons_Teleport(), PutPlayerInServer(), TeleportPlayer(), and WarpZone_TeleportPlayer().
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().
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().
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(), havocbot_chooseenemy(), and havocbot_goalrating_enemyplayers().
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().
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().
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().