From 01b67337a27e89ddb84b2c8ad2b2a9a92b05e272 Mon Sep 17 00:00:00 2001 From: Mircea Kitsune Date: Sat, 19 Nov 2011 02:05:04 +0200 Subject: [PATCH] Fix a small and unlikely bug that I discovered in Vore Tournament. If a bot does not have a weapon but attempts to reload it / switch to it, he will have weird animations. Therefore, make sure the bot has the weapon before trying to switch. --- qcsrc/server/bot/havocbot/havocbot.qc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcsrc/server/bot/havocbot/havocbot.qc b/qcsrc/server/bot/havocbot/havocbot.qc index 9b7198cef..961a201a1 100644 --- a/qcsrc/server/bot/havocbot/havocbot.qc +++ b/qcsrc/server/bot/havocbot/havocbot.qc @@ -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; } } -- 2.39.2