diff --git a/Content.Shared/CombatMode/CombatModeComponent.cs b/Content.Shared/CombatMode/CombatModeComponent.cs index 88a2d3b713..8e8ffbc53b 100644 --- a/Content.Shared/CombatMode/CombatModeComponent.cs +++ b/Content.Shared/CombatMode/CombatModeComponent.cs @@ -49,7 +49,7 @@ public sealed partial class CombatModeComponent : Component [DataField, AutoNetworkedField] public bool ToggleMouseRotator = true; - + // WD EDIT START /// /// If true, sets to 1 degree and /// to false when the owner enters combatmode. This is currently being tested as of 06.12.24, @@ -61,5 +61,6 @@ public sealed partial class CombatModeComponent : Component /// [DataField, AutoNetworkedField] public bool SmoothRotation = true; + // WD EDIT END } } diff --git a/Content.Shared/CombatMode/SharedCombatModeSystem.cs b/Content.Shared/CombatMode/SharedCombatModeSystem.cs index bb2e93d734..60b31a00a2 100644 --- a/Content.Shared/CombatMode/SharedCombatModeSystem.cs +++ b/Content.Shared/CombatMode/SharedCombatModeSystem.cs @@ -93,11 +93,13 @@ private void SetMouseRotatorComponents(EntityUid uid, bool value) if (value) { var rot = EnsureComp(uid); + // WD EDIT START if (TryComp(uid, out var comp) && comp.SmoothRotation) // no idea under which (intended) circumstances this can fail (if any), so i'll avoid Comp<>(). { rot.AngleTolerance = Angle.FromDegrees(1); // arbitrary rot.Simple4DirMode = false; } + // WD EDIT END EnsureComp(uid); } else