]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/aim.qc
Replace print calls with logger calls
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / aim.qc
index 320257fa1908286430b2d05ebe9d3f696e3e7748..5549778be82c2f50ce7928b3e5fe5e6bd6f52557 100644 (file)
@@ -143,8 +143,7 @@ float bot_shouldattack(entity e)
        if(e.flags & FL_NOTARGET)
                return false;
 
-       checkentity = e;
-       if(MUTATOR_CALLHOOK(BotShouldAttack))
+       if(MUTATOR_CALLHOOK(BotShouldAttack, e))
                return false;
 
        return true;
@@ -340,16 +339,16 @@ float bot_aim(float shotspeed, float shotspeedupward, float maxshottime, float a
        hf = self.dphitcontentsmask;
        self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;
 
-       shotspeed *= g_weaponspeedfactor;
-       shotspeedupward *= g_weaponspeedfactor;
+       shotspeed *= W_WeaponSpeedFactor();
+       shotspeedupward *= W_WeaponSpeedFactor();
        if (!shotspeed)
        {
-               dprint("bot_aim: WARNING: weapon ", WEP_NAME(self.weapon), " shotspeed is zero!\n");
+               LOG_TRACE("bot_aim: WARNING: weapon ", WEP_NAME(self.weapon), " shotspeed is zero!\n");
                shotspeed = 1000000;
        }
        if (!maxshottime)
        {
-               dprint("bot_aim: WARNING: weapon ", WEP_NAME(self.weapon), " maxshottime is zero!\n");
+               LOG_TRACE("bot_aim: WARNING: weapon ", WEP_NAME(self.weapon), " maxshottime is zero!\n");
                maxshottime = 1;
        }
        makevectors(self.v_angle);