.int wpflags;
bool bot_aim(entity this, .entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, float applygravity);
+void bot_aim_reset(entity this);
void bot_clientconnect(entity this);
void bot_clientdisconnect(entity this);
void bot_cmdhelp(string scmd);
this.bot_canfire = 1;
}
+void bot_aim_reset(entity this)
+{
+ this.bot_aimdir_executed = true;
+ makevectors(this.v_angle);
+ this.bot_badaimtime = 0;
+ this.bot_aimthinktime = time;
+ this.bot_prevaimtime = time;
+ this.bot_mouseaim = v_forward;
+ this.bot_olddesiredang = v_forward;
+ this.bot_1st_order_aimfilter = '0 0 0';
+ this.bot_2nd_order_aimfilter = '0 0 0';
+ this.bot_3th_order_aimfilter = '0 0 0';
+ this.bot_4th_order_aimfilter = '0 0 0';
+ this.bot_5th_order_aimfilter = '0 0 0';
+ this.bot_firetimer = 0;
+}
+
void bot_aimdir(entity this, vector v, float maxfiredeviation)
{
float dist, delta_t, blend;
float bot_shouldattack(entity this, entity targ);
void bot_aimdir(entity this, vector v, float maxfiredeviation);
bool bot_aim(entity this, .entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, bool applygravity);
+void bot_aim_reset(entity this);
float findtrajectorywithleading(vector org, vector m1, vector m2, entity targ, float shotspeed, float shotspeedupward, float maxtime, float shotdelay, entity ignore);
vector bot_shotlead(vector targorigin, vector targvelocity, float shotspeed, float shotdelay);
this.angles = spot.angles;
this.angles_z = 0; // never spawn tilted even if the spot says to
if (IS_BOT_CLIENT(this))
+ {
this.v_angle = this.angles;
+ bot_aim_reset(this);
+ }
this.fixangle = true; // turn this way immediately
this.oldvelocity = this.velocity = '0 0 0';
this.avelocity = '0 0 0';