diff --git a/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs b/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs index 8b52ae3794..0c424fe17d 100644 --- a/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs +++ b/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs @@ -1,16 +1,12 @@ using System; -using System.Collections.Generic; using Content.Server.GameObjects.Components.Access; using Content.Server.GameObjects.EntitySystems; -using Content.Server.Interfaces.GameObjects.Components.Movement; -using Content.Server.Utility; using Content.Shared.GameObjects.Components.Doors; +using Content.Shared.GameObjects.Components.Movement; using Robust.Server.GameObjects; using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.GameObjects; -using Robust.Shared.Interfaces.GameObjects.Components; -using Robust.Shared.Interfaces.Network; using Robust.Shared.Maths; using Robust.Shared.Serialization; using Robust.Shared.Timers; @@ -102,7 +98,10 @@ namespace Content.Server.GameObjects // TODO: temporary hack to fix the physics system raising collision events akwardly. // E.g. when moving parallel to a door by going off the side of a wall. - var dotProduct = Vector2.Dot(mover.VelocityDir.Normalized, (entity.Transform.WorldPosition - Owner.Transform.WorldPosition).Normalized); + var (walking, sprinting) = mover.VelocityDir; + // Also TODO: walking and sprint dir are added together here + // instead of calculating their contribution correctly. + var dotProduct = Vector2.Dot((sprinting + walking).Normalized, (entity.Transform.WorldPosition - Owner.Transform.WorldPosition).Normalized); if (dotProduct <= -0.9f) TryOpen(entity); } @@ -162,7 +161,7 @@ namespace Content.Server.GameObjects State = DoorState.Open; SetAppearance(DoorVisualState.Open); }, _cancellationTokenSource.Token); - + Owner.EntityManager.EventBus.RaiseEvent(EventSource.Local, new AccessReaderChangeMessage(Owner.Uid, false)); } diff --git a/Content.Server/GameObjects/Components/NodeContainer/Nodes/Node.cs b/Content.Server/GameObjects/Components/NodeContainer/Nodes/Node.cs index 3ea4e305a2..82b1b25950 100644 --- a/Content.Server/GameObjects/Components/NodeContainer/Nodes/Node.cs +++ b/Content.Server/GameObjects/Components/NodeContainer/Nodes/Node.cs @@ -6,6 +6,7 @@ using Robust.Shared.ViewVariables; using System.Collections.Generic; using System.Diagnostics; using System.Linq; +using Robust.Shared.GameObjects.Components; namespace Content.Server.GameObjects.Components.NodeContainer.Nodes { @@ -37,7 +38,7 @@ namespace Content.Server.GameObjects.Components.NodeContainer.Nodes /// private bool Connectable => !_deleting && Anchored; - private bool Anchored => !Owner.TryGetComponent(out var physics) || physics.Anchored; + private bool Anchored => !Owner.TryGetComponent(out var physics) || physics.Anchored; /// /// Prevents a node from being used by other nodes while midway through removal. @@ -89,7 +90,7 @@ namespace Content.Server.GameObjects.Components.NodeContainer.Nodes public void StartSpreadingGroup() { - NodeGroup.BeforeRemakeSpread(); + NodeGroup.BeforeRemakeSpread(); SpreadGroup(); NodeGroup.AfterRemakeSpread(); } @@ -112,7 +113,7 @@ namespace Content.Server.GameObjects.Components.NodeContainer.Nodes /// /// How this node will attempt to find other reachable s to group with. - /// Returns a set of s to consider grouping with. Should not return this current . + /// Returns a set of s to consider grouping with. Should not return this current . /// protected abstract IEnumerable GetReachableNodes(); diff --git a/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverComponent.cs b/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverComponent.cs index ccb2629e93..d8c0bfe9a1 100644 --- a/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverComponent.cs +++ b/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverComponent.cs @@ -8,6 +8,7 @@ using Robust.Shared.IoC; using Robust.Shared.Serialization; using Robust.Shared.ViewVariables; using System; +using Robust.Shared.GameObjects.Components; namespace Content.Server.GameObjects.Components.Power.ApcNetComponents {