diff --git a/Barotrauma/BarotraumaClient/Source/Items/Item.cs b/Barotrauma/BarotraumaClient/Source/Items/Item.cs index 9b14eff13..d8e8e476e 100644 --- a/Barotrauma/BarotraumaClient/Source/Items/Item.cs +++ b/Barotrauma/BarotraumaClient/Source/Items/Item.cs @@ -81,11 +81,21 @@ namespace Barotrauma { if (holdable.Picker.SelectedItems[0] == this) { - depth = holdable.Picker.AnimController.GetLimb(LimbType.RightHand).sprite.Depth + 0.000001f; + Limb holdLimb = holdable.Picker.AnimController.GetLimb(LimbType.RightHand); + depth = holdLimb.sprite.Depth + 0.000001f; + foreach (WearableSprite wearableSprite in holdLimb.WearingItems) + { + if (!wearableSprite.InheritLimbDepth && wearableSprite.Sprite != null) depth = Math.Min(wearableSprite.Sprite.Depth, depth); + } } else if (holdable.Picker.SelectedItems[1] == this) { - depth = holdable.Picker.AnimController.GetLimb(LimbType.LeftArm).sprite.Depth - 0.000001f; + Limb holdLimb = holdable.Picker.AnimController.GetLimb(LimbType.LeftArm); + depth = holdLimb.sprite.Depth - 0.000001f; + foreach (WearableSprite wearableSprite in holdLimb.WearingItems) + { + if (!wearableSprite.InheritLimbDepth && wearableSprite.Sprite != null) depth = Math.Max(wearableSprite.Sprite.Depth, depth); + } } } body.Draw(spriteBatch, selectedSprite, color, depth); diff --git a/Barotrauma/BarotraumaShared/Content/Items/Diving/divinggear.xml b/Barotrauma/BarotraumaShared/Content/Items/Diving/divinggear.xml index 21c5e897e..b207683a0 100644 --- a/Barotrauma/BarotraumaShared/Content/Items/Diving/divinggear.xml +++ b/Barotrauma/BarotraumaShared/Content/Items/Diving/divinggear.xml @@ -83,22 +83,22 @@ - + - - + + - - + + - - + + - - + + - - + +