]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Fix a small and unlikely bug that I discovered in Vore Tournament. If a bot does...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 19 Nov 2011 00:07:53 +0000 (02:07 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 19 Nov 2011 00:07:53 +0000 (02:07 +0200)
data/qcsrc/server/bot/havocbot/havocbot.qc
docs/Release notes.txt

index 570fe7eb1de34fde977f52a4a8aca82f9dc4443c..43d6364e50a705970316176cf75592d8df188e2d 100644 (file)
@@ -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;
                        }
                }
index af55a3360d5a3f25c16a5c559a18fe8553284337..f4245ae2a3008ca134d0a6681bd14ab3fcfaabb2 100644 (file)
@@ -264,6 +264,8 @@ Bug fixes:
 \r
 - Fixed a bug causing Grabber recoil to not work.\r
 \r
+- Prevent bots switching to weapons they don't own in order to reload them, causing weird animations.\r
+\r
 Features:\r
 \r
 - 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.\r