]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/t_items.qc
Use some more WEP_MAXCOUNT and fix checks of WEP_LAST
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / t_items.qc
index 9f0075afa53756b1f278443e979f7d37bde3c424..63d0a48b7b71f926de0b4b913baffd3882790a09 100644 (file)
@@ -598,7 +598,7 @@ float weapon_pickupevalfunc(entity player, entity item)
        // If custom weapon priorities for bots is enabled rate most wanted weapons higher
        if( bot_custom_weapon && c )
        {
-               for(i = WEP_FIRST; i < WEP_LAST ; ++i)
+               for(i = WEP_FIRST; i <= WEP_LAST ; ++i)
                {
                        // Find weapon
                        if( (get_weaponinfo(i)).weapons & item.weapons  != item.weapons )
@@ -638,7 +638,7 @@ float commodity_pickupevalfunc(entity player, entity item)
        c = 0;
 
        // Detect needed ammo
-       for(i = WEP_FIRST; i < WEP_LAST ; ++i)
+       for(i = WEP_FIRST; i <= WEP_LAST ; ++i)
        {
                wi = get_weaponinfo(i);