diff --git a/Subsurface/Source/Items/Item.cs b/Subsurface/Source/Items/Item.cs index 07d9fae0b..46232e02a 100644 --- a/Subsurface/Source/Items/Item.cs +++ b/Subsurface/Source/Items/Item.cs @@ -181,6 +181,7 @@ namespace Barotrauma get { return condition; } set { + if (GameMain.Client != null) return; if (!MathUtils.IsValid(value)) return; float prev = condition; @@ -1722,12 +1723,14 @@ namespace Barotrauma ownInventory.ServerWrite(msg, c, extraData); break; case NetEntityEvent.Type.Status: - msg.WriteRangedSingle(condition, 0.0f, 100.0f, 8); + //clamp above 0.5f if condition > 0.0f + //to prevent condition from being rounded down to 0.0 even if the item is not broken + msg.WriteRangedSingle(condition > 0.0f ? Math.Max(condition, 0.5f) : 0.0f, 0.0f, 100.0f, 8); if (condition <= 0.0f && FixRequirements.Count > 0) { - for (int i = 0; i 0) {