(541e3ffbe) Check that the mask is equipped in the head before trying to unequip.

This commit is contained in:
Joonas Rikkonen
2019-04-04 11:12:18 +03:00
parent 7126a60b7a
commit 709d9e44ab
3 changed files with 3 additions and 6 deletions
@@ -132,7 +132,8 @@ namespace Barotrauma
{
if (!character.SelectedItems.Contains(Weapon))
{
if (character.Inventory.TryPutItem(Weapon, 3, true, false, character))
var slots = Weapon.AllowedSlots.FindAll(s => s == InvSlotType.LeftHand || s == InvSlotType.RightHand || s == (InvSlotType.LeftHand | InvSlotType.RightHand));
if (character.Inventory.TryPutItem(Weapon, character, slots))
{
Weapon.Equip(character);
}