From ab40b1ab734f664d18f96066e2c6e65a515866c9 Mon Sep 17 00:00:00 2001 From: Princess Cheeseballs <66055347+Princess-Cheeseballs@users.noreply.github.com> Date: Fri, 12 Sep 2025 16:23:57 -0700 Subject: [PATCH] Chameleon Projector Physics Fix (#37960) * One commit * Move files --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com> --- .../Movement/Systems/SharedMoverController.Input.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Content.Shared/Movement/Systems/SharedMoverController.Input.cs b/Content.Shared/Movement/Systems/SharedMoverController.Input.cs index 2560f33e9c..1189280616 100644 --- a/Content.Shared/Movement/Systems/SharedMoverController.Input.cs +++ b/Content.Shared/Movement/Systems/SharedMoverController.Input.cs @@ -9,6 +9,7 @@ using Robust.Shared.GameStates; using Robust.Shared.Input; using Robust.Shared.Input.Binding; using Robust.Shared.Map.Components; +using Robust.Shared.Physics; using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; @@ -57,6 +58,7 @@ namespace Content.Shared.Movement.Systems SubscribeLocalEvent(OnMoverGetState); SubscribeLocalEvent(OnMoverHandleState); SubscribeLocalEvent(OnInputParentChange); + SubscribeLocalEvent(OnAnchorState); SubscribeLocalEvent(OnFollowedParentChange); @@ -296,6 +298,12 @@ namespace Content.Shared.Movement.Systems Dirty(entity.Owner, entity.Comp); } + private void OnAnchorState(Entity entity, ref AnchorStateChangedEvent args) + { + if (!args.Anchored) + PhysicsSystem.SetBodyType(entity, BodyType.KinematicController); + } + private void HandleDirChange(EntityUid entity, Direction dir, ushort subTick, bool state) { // Relayed movement just uses the same keybinds given we're moving the relayed entity