(ec990ac7c) Save chatbox & crew menu toggle state between rounds

This commit is contained in:
Joonas Rikkonen
2019-04-11 18:26:26 +03:00
parent c87606fd28
commit 9b0e0ab278
8 changed files with 41 additions and 38 deletions
@@ -207,10 +207,10 @@ namespace Barotrauma
break;
}
if (IsAttached && attachTargetBody != null && deattachTimer < 0.0f)
if (attachTargetBody != null && deattachTimer < 0.0f)
{
Entity entity = attachTargetBody.UserData as Entity;
Submarine attachedSub = entity is Submarine sub ? sub : entity?.Submarine;
Submarine attachedSub = entity is Submarine ? (Submarine)entity : entity?.Submarine;
if (attachedSub != null)
{
float velocity = attachedSub.Velocity == Vector2.Zero ? 0.0f : attachedSub.Velocity.Length();