]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Take in account cvar g_antilag_bullets for aiming (only for shotgun for now)
authormand1nga <mand1nga@xonotic.org>
Thu, 18 Aug 2011 13:53:21 +0000 (10:53 -0300)
committermand1nga <mand1nga@xonotic.org>
Thu, 18 Aug 2011 13:53:21 +0000 (10:53 -0300)
qcsrc/server/w_shotgun.qc

index c4cc5f051e6568ac85d5a62dd87f68bf52a6aa04..9d80ff4a7b88c2318c78e7468b4ce816d108e32f 100644 (file)
@@ -113,7 +113,13 @@ float w_shotgun(float req)
                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(autocvar_g_balance_shotgun_primary_speed, 0, 0.001, FALSE);
+               {
+                       if(autocvar_g_antilag_bullets)
+                               self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, FALSE);
+                       else
+                               self.BUTTON_ATCK = bot_aim(autocvar_g_balance_shotgun_primary_speed, 0, 0.001, FALSE);
+               }
+
        else if (req == WR_THINK)
        {
                if(autocvar_g_balance_shotgun_reload_ammo && self.clip_load < autocvar_g_balance_shotgun_primary_ammo) // forced reload