From 25e0877a52566a8dd940991461fe3d994666f5c5 Mon Sep 17 00:00:00 2001 From: mand1nga Date: Mon, 11 Apr 2011 09:22:05 -0300 Subject: [PATCH] Bots: Fix divide by zero error when using the nex. Made them able to charge the nex. --- qcsrc/server/w_nex.qc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qcsrc/server/w_nex.qc b/qcsrc/server/w_nex.qc index a0fce6a31..2d5ea6aa2 100644 --- a/qcsrc/server/w_nex.qc +++ b/qcsrc/server/w_nex.qc @@ -87,8 +87,13 @@ float w_nex(float req) float ammo_amount; if (req == WR_AIM) { - self.BUTTON_ATCK = bot_aim(1000000, 0, 1, FALSE); - self.BUTTON_ATCK2 = bot_aim(1000000, 0, 1, FALSE); + if(bot_aim(1000000, 0, 1, FALSE)) + self.BUTTON_ATCK = TRUE; + else + { + if(autocvar_g_balance_nex_charge) + self.BUTTON_ATCK2 = TRUE; + } } else if (req == WR_THINK) { -- 2.39.2