]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/bot/havocbot/havocbot.qc
Small tweaks to the weapon reload code, that I also worked on in Xonotic
[voretournament/voretournament.git] / data / qcsrc / server / bot / havocbot / havocbot.qc
index 6a21f4fa929c649fd4ea7ede62d5cc00c3f34d77..faca874cf3a94df6cad4c435007768b73fa36390 100644 (file)
@@ -171,7 +171,7 @@ void havocbot_ai()
                        for(i = WEP_FIRST; i <= WEP_LAST; ++i)
                        {
                                e = get_weaponinfo(i);
-                               if(self.weapon_load[i] < cvar(strcat("g_balance_", e.netname, "_reload_ammo")))
+                               if ((e.spawnflags & WEP_FLAG_RELOADABLE) && self.weapon_load[i] < cvar(strcat("g_balance_", e.netname, "_reload_ammo")))
                                        self.switchweapon = i;
                        }
                }