From ec0752c39b3ee15e84d0bdd5bdded17e2242f2e9 Mon Sep 17 00:00:00 2001 From: Tayrtahn Date: Tue, 2 Jul 2024 06:30:53 +0300 Subject: [PATCH] Fixed buckled players thrashing while speaking in beds (#29653) * Fix characters thrashing when talking while lying down * Remove weird design choice --- Content.Client/Rotation/RotationVisualizerSystem.cs | 4 ++-- Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Content.Client/Rotation/RotationVisualizerSystem.cs b/Content.Client/Rotation/RotationVisualizerSystem.cs index 6105c10c80..6d3be4d1c0 100644 --- a/Content.Client/Rotation/RotationVisualizerSystem.cs +++ b/Content.Client/Rotation/RotationVisualizerSystem.cs @@ -23,8 +23,8 @@ public sealed class RotationVisualizerSystem : SharedRotationVisualsSystem if (args.Sprite == null) return; - // If not defined, defaults to standing. - _appearance.TryGetData(uid, RotationVisuals.RotationState, out var state, args.Component); + if (!_appearance.TryGetData(uid, RotationVisuals.RotationState, out var state, args.Component)) + return; switch (state) { diff --git a/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs b/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs index 3abb9d7142..500100a9f3 100644 --- a/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs +++ b/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs @@ -362,6 +362,7 @@ public abstract partial class SharedBuckleSystem SetBuckledTo(buckle, strap!); Appearance.SetData(strap, StrapVisuals.State, true); Appearance.SetData(buckle, BuckleVisuals.Buckled, true); + _rotationVisuals.SetHorizontalAngle(buckle.Owner, strap.Comp.Rotation); var xform = Transform(buckle);