]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/default/aim.qh
Bot AI: reset aim when bots respawn
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / default / aim.qh
index d1cbd0d629a71368ed5b8ea74fe26b4a73ea245d..2a3145176258a6aa523efd3c95a252c8251ba897 100644 (file)
@@ -1,5 +1,4 @@
-#ifndef AIM_H
-#define AIM_H
+#pragma once
 /*
  * Globals and Fields
  */
@@ -60,6 +59,7 @@ vector shotdir;
 .vector lag5_vec3;
 .vector lag5_vec4;
 
+.bool bot_aimdir_executed;
 .float bot_badaimtime;
 .float bot_aimthinktime;
 .float bot_prevaimtime;
@@ -75,8 +75,8 @@ vector shotdir;
 .vector bot_5th_order_aimfilter;
 .vector bot_olddesiredang;
 
-.vector bot_aimselforigin;
-.vector bot_aimselfvelocity;
+//.vector bot_aimorigin;
+//.vector bot_aimvelocity;
 .vector bot_aimtargorigin;
 .vector bot_aimtargvelocity;
 
@@ -86,16 +86,16 @@ vector shotdir;
  * Functions
  */
 
-float lag_additem(float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4);
-void lag_update();
-void bot_lagfunc(float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4);
+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 bot_lagfunc(entity this, float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4);
 
-float bot_shouldattack(entity e);
-float bot_aimdir(vector v, float maxfiredeviation);
-float bot_aim(float shotspeed, float shotspeedupward, float maxshottime, float applygravity);
+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);
 
-.void(float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4) lag_func;
-#endif
+.void(entity this, float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4) lag_func;