]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Added support for shotgun melee
authormand1nga <mand1nga@xonotic.org>
Sat, 4 Dec 2010 17:17:15 +0000 (14:17 -0300)
committermand1nga <mand1nga@xonotic.org>
Sat, 4 Dec 2010 17:17:15 +0000 (14:17 -0300)
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)