From: MirceaKitsune Date: Sat, 19 Nov 2011 00:07:53 +0000 (+0200) Subject: Fix a small and unlikely bug that I discovered in Vore Tournament. If a bot does... X-Git-Url: https://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=commitdiff_plain;h=41f6808c0d411542c5a5d77a62130892a309e0d8 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. --- diff --git a/data/qcsrc/server/bot/havocbot/havocbot.qc b/data/qcsrc/server/bot/havocbot/havocbot.qc index 570fe7eb..43d6364e 100644 --- a/data/qcsrc/server/bot/havocbot/havocbot.qc +++ b/data/qcsrc/server/bot/havocbot/havocbot.qc @@ -171,7 +171,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; } } diff --git a/docs/Release notes.txt b/docs/Release notes.txt index af55a336..f4245ae2 100644 --- a/docs/Release notes.txt +++ b/docs/Release notes.txt @@ -264,6 +264,8 @@ Bug fixes: - Fixed a bug causing Grabber recoil to not work. +- Prevent bots switching to weapons they don't own in order to reload them, causing weird animations. + Features: - There is no longer a player swallow limit. Players have a stomach capacity (for predators) and a mass (for prey), both based on player scale. As long as your mass is not exceeded, you can keep swallowing players. This affects your weight and overall player capacity based on player size as well. eg: You might be able to eat only one large player, three tiny players, or two normal sized players at the same time. Stomach size will also reflect your capacity, not the player count, being bigger or smaller based on the prey inside and their size compared to yours. By default, a macro can swallow up to 15 mircos and a micro up to 1 macro.