]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_shotgun.qc
add a comment
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_shotgun.qc
index d9bb056ee6c6c8e65678509ba6c4ff1b91041411..08c4a901e12083d7bdd972ed8755e3010cf97d9e 100644 (file)
@@ -100,10 +100,10 @@ void spawnfunc_weapon_shotgun(); // defined in t_items.qc
 float w_shotgun(float req)
 {
        if (req == WR_AIM)
-               if(vlen(self.origin-self.enemy.origin)>200)
-                       self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, FALSE);
-               else
+               if(vlen(self.origin-self.enemy.origin) <= autocvar_g_balance_shotgun_secondary_melee_range)
                        self.BUTTON_ATCK2 = bot_aim(1000000, 0, 0.001, FALSE);
+               else
+                       self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, FALSE);
        else if (req == WR_THINK)
        {
                if (self.BUTTON_ATCK)