diff --git a/Content.Server/GameObjects/Components/Atmos/MovedByPressureComponent.cs b/Content.Server/GameObjects/Components/Atmos/MovedByPressureComponent.cs index fdb5fb8862..2513d5616f 100644 --- a/Content.Server/GameObjects/Components/Atmos/MovedByPressureComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/MovedByPressureComponent.cs @@ -8,6 +8,7 @@ using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Map; using Robust.Shared.Maths; +using Robust.Shared.Physics; using Robust.Shared.Random; using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.ViewVariables; @@ -58,9 +59,9 @@ namespace Content.Server.GameObjects.Components.Atmos if (moveProb > ProbabilityOffset && _robustRandom.Prob(MathF.Min(moveProb / 100f, 1f)) && !float.IsPositiveInfinity(MoveResist) - && (!physics.Anchored + && (physics.BodyType != BodyType.Static && (maxForce >= (MoveResist * MoveForcePushRatio))) - || (physics.Anchored && (maxForce >= (MoveResist * MoveForceForcePushRatio)))) + || (physics.BodyType == BodyType.Static && (maxForce >= (MoveResist * MoveForceForcePushRatio)))) { if (physics.Owner.HasComponent()) diff --git a/Content.Server/GlobalVerbs/SetAnchorVerb.cs b/Content.Server/GlobalVerbs/SetAnchorVerb.cs index 0373b45519..520f4d9a0e 100644 --- a/Content.Server/GlobalVerbs/SetAnchorVerb.cs +++ b/Content.Server/GlobalVerbs/SetAnchorVerb.cs @@ -4,6 +4,7 @@ using Robust.Server.Console; using Robust.Server.GameObjects; using Robust.Shared.GameObjects; using Robust.Shared.IoC; +using Robust.Shared.Physics; namespace Content.Server.GlobalVerbs { @@ -30,7 +31,7 @@ namespace Content.Server.GlobalVerbs if (groupController.CanCommand(player.PlayerSession, "setanchor")) { - data.Text = physics.Anchored ? "Unanchor" : "Anchor"; + data.Text = physics.BodyType == BodyType.Static ? "Unanchor" : "Anchor"; data.Visibility = VerbVisibility.Visible; } } @@ -46,7 +47,7 @@ namespace Content.Server.GlobalVerbs if (target.TryGetComponent(out PhysicsComponent? physics)) { - physics.Anchored = !physics.Anchored; + physics.BodyType = physics.BodyType == BodyType.Static ? BodyType.Dynamic : BodyType.Static; } } } diff --git a/Content.Shared/GameObjects/Components/Pulling/SharedPullableComponent.cs b/Content.Shared/GameObjects/Components/Pulling/SharedPullableComponent.cs index 6f434fffee..604d6a9b46 100644 --- a/Content.Shared/GameObjects/Components/Pulling/SharedPullableComponent.cs +++ b/Content.Shared/GameObjects/Components/Pulling/SharedPullableComponent.cs @@ -210,7 +210,7 @@ namespace Content.Shared.GameObjects.Components.Pulling return false; } - if (_physics.Anchored) + if (_physics.BodyType == BodyType.Static) { return false; }