]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix a small and unlikely bug that I discovered in Vore Tournament. If a bot does...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 19 Nov 2011 00:05:04 +0000 (02:05 +0200)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 19 Nov 2011 00:05:04 +0000 (02:05 +0200)
qcsrc/server/bot/havocbot/havocbot.qc

index 9b7198cef821f83efb36eeabae7e4923ae502989..961a201a171095dae3c82ec3c6d5fbb16b1adf53 100644 (file)
@@ -168,7 +168,7 @@ void havocbot_ai()
                        for(i = WEP_FIRST; i <= WEP_LAST; ++i)
                        {
                                e = get_weaponinfo(i);
-                               if ((e.spawnflags & WEP_FLAG_RELOADABLE) && (self.weapon_load[i] < cvar(strcat("g_balance_", e.netname, "_reload_ammo"))))
+                               if ((self.weapons & i) && (e.spawnflags & WEP_FLAG_RELOADABLE) && (self.weapon_load[i] < cvar(strcat("g_balance_", e.netname, "_reload_ammo"))))
                                        self.switchweapon = i;
                        }
                }