]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't use direct cvar access for bot weapon logic
authorSamual Lenks <samual@xonotic.org>
Wed, 1 Jan 2014 12:47:56 +0000 (07:47 -0500)
committerSamual Lenks <samual@xonotic.org>
Wed, 1 Jan 2014 12:47:56 +0000 (07:47 -0500)
qcsrc/server/bot/havocbot/havocbot.qc

index 5fe36532734d2f07602fd8816b0ba2eb077875c0..124e2cdb64ae05f32f7412eb58d4d3612379b628 100644 (file)
@@ -164,7 +164,7 @@ void havocbot_ai()
                        for(i = WEP_FIRST; i <= WEP_LAST; ++i)
                        {
                                e = get_weaponinfo(i);
-                               if ((self.weapons & WepSet_FromWeapon(i)) && (e.spawnflags & WEP_FLAG_RELOADABLE) && (self.weapon_load[i] < cvar(strcat("g_balance_", e.netname, "_reload_ammo")))) // WEAPONTODO
+                               if ((self.weapons & WepSet_FromWeapon(i)) && (e.spawnflags & WEP_FLAG_RELOADABLE) && (self.weapon_load[i] < e.reloading_ammo))
                                        self.switchweapon = i;
                        }
                }