]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/default/aim.qc
Unhardcode a few more 0 slot cases
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / default / aim.qc
index 7c87db0ff76de8684573b6705a57830e6af5e6a6..c278be915a2278a3eabd89966c990cf6ad44c75e 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "../../weapons/weaponsystem.qh"
 
-#include "../../mutators/all.qh"
+#include "../../mutators/_mod.qh"
 
 // traces multiple trajectories to find one that will impact the target
 // 'end' vector is the place it aims for,
@@ -323,7 +323,7 @@ vector bot_shotlead(vector targorigin, vector targvelocity, float shotspeed, flo
        return targorigin + targvelocity * (shotdelay + vlen(targorigin - shotorg) / shotspeed);
 }
 
-bool bot_aim(entity this, float shotspeed, float shotspeedupward, float maxshottime, bool applygravity)
+bool bot_aim(entity this, .entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, bool applygravity)
 {
        float f, r, hf, distanceratio;
        vector v;
@@ -343,12 +343,12 @@ bool bot_aim(entity this, float shotspeed, float shotspeedupward, float maxshott
        shotspeedupward *= W_WeaponSpeedFactor(this);
        if (!shotspeed)
        {
-               LOG_TRACE("bot_aim: WARNING: weapon ", PS(this).m_weapon.m_name, " shotspeed is zero!\n");
+               LOG_TRACE("bot_aim: WARNING: weapon ", this.(weaponentity).m_weapon.m_name, " shotspeed is zero!");
                shotspeed = 1000000;
        }
        if (!maxshottime)
        {
-               LOG_TRACE("bot_aim: WARNING: weapon ", PS(this).m_weapon.m_name, " maxshottime is zero!\n");
+               LOG_TRACE("bot_aim: WARNING: weapon ", this.(weaponentity).m_weapon.m_name, " maxshottime is zero!");
                maxshottime = 1;
        }
        makevectors(this.v_angle);