active gun bug fix

This commit is contained in:
landgreen
2020-02-27 06:48:25 -08:00
parent fab3d52585
commit c9898ad53f

View File

@@ -74,6 +74,7 @@ const build = {
b.guns[index].count = 0; b.guns[index].count = 0;
b.guns[index].have = false; b.guns[index].have = false;
if (b.guns[index].ammo != Infinity) b.guns[index].ammo = 0; if (b.guns[index].ammo != Infinity) b.guns[index].ammo = 0;
if (b.inventory.length === 0) b.activeGun = null;
game.makeGunHUD(); game.makeGunHUD();
break break
} }