fixed a bug with multiple ammo items ignoring unlimited pouches

This commit is contained in:
termigator1359 committed 2020-07-14 13:39:15 -04:00
1 parent a949ca7252
commit 14a2189b45
1 file changed
+2 -2
+2 -2
View File
@@ -3576,7 +3576,7 @@ Grants immunity to fire blocks, and temporary immunity to lava";
for (int i = 54; i < Main.maxInventory; i++)
{
if (player.inventory[i].ammo == item.useAmmo && player.inventory[i].stack >= ammoConsumed)
if (player.inventory[i].ammo == item.useAmmo && (player.inventory[i].stack >= ammoConsumed || !player.inventory[i].consumable))
{
itemAmmo = player.inventory[i];
flag = true;
@@ -3588,7 +3588,7 @@ Grants immunity to fire blocks, and temporary immunity to lava";
{
for (int j = 0; j < 54; j++)
{
if (player.inventory[j].ammo == item.useAmmo && player.inventory[j].stack >= ammoConsumed)
if (player.inventory[j].ammo == item.useAmmo && (player.inventory[j].stack >= ammoConsumed || !player.inventory[j].consumable))
{
itemAmmo = player.inventory[j];
break;