Chameleon Projector Physics Fix (#37960)
* One commit * Move files --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
79a34556e5
commit
ab40b1ab73
@@ -9,6 +9,7 @@ using Robust.Shared.GameStates;
|
|||||||
using Robust.Shared.Input;
|
using Robust.Shared.Input;
|
||||||
using Robust.Shared.Input.Binding;
|
using Robust.Shared.Input.Binding;
|
||||||
using Robust.Shared.Map.Components;
|
using Robust.Shared.Map.Components;
|
||||||
|
using Robust.Shared.Physics;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
@@ -57,6 +58,7 @@ namespace Content.Shared.Movement.Systems
|
|||||||
SubscribeLocalEvent<InputMoverComponent, ComponentGetState>(OnMoverGetState);
|
SubscribeLocalEvent<InputMoverComponent, ComponentGetState>(OnMoverGetState);
|
||||||
SubscribeLocalEvent<InputMoverComponent, ComponentHandleState>(OnMoverHandleState);
|
SubscribeLocalEvent<InputMoverComponent, ComponentHandleState>(OnMoverHandleState);
|
||||||
SubscribeLocalEvent<InputMoverComponent, EntParentChangedMessage>(OnInputParentChange);
|
SubscribeLocalEvent<InputMoverComponent, EntParentChangedMessage>(OnInputParentChange);
|
||||||
|
SubscribeLocalEvent<InputMoverComponent, AnchorStateChangedEvent>(OnAnchorState);
|
||||||
|
|
||||||
SubscribeLocalEvent<FollowedComponent, EntParentChangedMessage>(OnFollowedParentChange);
|
SubscribeLocalEvent<FollowedComponent, EntParentChangedMessage>(OnFollowedParentChange);
|
||||||
|
|
||||||
@@ -296,6 +298,12 @@ namespace Content.Shared.Movement.Systems
|
|||||||
Dirty(entity.Owner, entity.Comp);
|
Dirty(entity.Owner, entity.Comp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnAnchorState(Entity<InputMoverComponent> entity, ref AnchorStateChangedEvent args)
|
||||||
|
{
|
||||||
|
if (!args.Anchored)
|
||||||
|
PhysicsSystem.SetBodyType(entity, BodyType.KinematicController);
|
||||||
|
}
|
||||||
|
|
||||||
private void HandleDirChange(EntityUid entity, Direction dir, ushort subTick, bool state)
|
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
|
// Relayed movement just uses the same keybinds given we're moving the relayed entity
|
||||||
|
|||||||
Reference in New Issue
Block a user