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 2ce9706..e58e670 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))
                        {