]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Clean up a bot weapon check
authorMario <zacjardine@y7mail.com>
Sat, 13 Dec 2014 08:33:54 +0000 (19:33 +1100)
committerMario <zacjardine@y7mail.com>
Sat, 13 Dec 2014 08:33:54 +0000 (19:33 +1100)
qcsrc/server/bot/havocbot/havocbot.qc

index 2ce9706a2ff40cdcb67557a2d1d6979a9d4e5dd3..e58e6709730282677350265c9c55a953c8945850 100644 (file)
@@ -982,7 +982,7 @@ void havocbot_chooseweapon()
        {
                // If no weapon was chosen get the first available weapon
                if(self.weapon==0)
-               for(i=WEP_BLASTER + 1; i < WEP_COUNT ; ++i) // Samual: This seems strange compared to other weapon loops...
+               for(i = WEP_FIRST; i <= WEP_LAST; ++i) if(i != WEP_BLASTER)
                {
                        if(client_hasweapon(self, i, TRUE, FALSE))
                        {