diff --git a/Subsurface/Source/Characters/Limb.cs b/Subsurface/Source/Characters/Limb.cs index 1adbca15d..8a86cc5a6 100644 --- a/Subsurface/Source/Characters/Limb.cs +++ b/Subsurface/Source/Characters/Limb.cs @@ -462,14 +462,14 @@ namespace Barotrauma Vector2 normal = new Vector2(-line.Y, line.X); normal = Vector2.Normalize(-normal); - float dragDot = Vector2.Dot(normal, velDir); + float dragDot = Math.Abs(Vector2.Dot(normal, velDir)); Vector2 dragForce = Vector2.Zero; if (dragDot > 0) { float vel = LinearVelocity.Length()*2.0f; float drag = dragDot * vel * vel * ConvertUnits.ToSimUnits(sprite.size.Y); - dragForce = drag * -velDir; + dragForce = Math.Min(drag, Mass*1000.0f) * -velDir; //if (dragForce.Length() > 100.0f) { } } diff --git a/Subsurface/Source/Items/Item.cs b/Subsurface/Source/Items/Item.cs index 9b4ffe5b7..5495caaec 100644 --- a/Subsurface/Source/Items/Item.cs +++ b/Subsurface/Source/Items/Item.cs @@ -703,6 +703,8 @@ namespace Barotrauma inWater = IsInWater(); if (inWater) ApplyStatusEffects(ActionType.InWater, deltaTime); + isHighlighted = false; + if (body == null || !body.Enabled) return; if (Math.Abs(body.LinearVelocity.X) > 0.01f || Math.Abs(body.LinearVelocity.Y) > 0.01f) @@ -881,7 +883,6 @@ namespace Barotrauma if (!editing || (body != null && !body.Enabled)) { - isHighlighted = false; return; }