From f6fbe41e7c08fe0d8b8798ee1d8d277d26ad3008 Mon Sep 17 00:00:00 2001 From: DrSmugleaf Date: Thu, 29 Oct 2020 09:53:31 +0100 Subject: [PATCH] Fix conveyors changing speed depending on the tick rate (#2424) --- .../GameObjects/Components/Conveyor/ConveyorComponent.cs | 2 +- Content.Shared/Physics/ConveyedController.cs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Content.Server/GameObjects/Components/Conveyor/ConveyorComponent.cs b/Content.Server/GameObjects/Components/Conveyor/ConveyorComponent.cs index 7a9b3131f7..6593075814 100644 --- a/Content.Server/GameObjects/Components/Conveyor/ConveyorComponent.cs +++ b/Content.Server/GameObjects/Components/Conveyor/ConveyorComponent.cs @@ -155,7 +155,7 @@ namespace Content.Server.GameObjects.Components.Conveyor if (entity.TryGetComponent(out IPhysicsComponent? physics)) { var controller = physics.EnsureController(); - controller.Move(direction, _speed * frameTime); + controller.Move(direction, _speed); } } } diff --git a/Content.Shared/Physics/ConveyedController.cs b/Content.Shared/Physics/ConveyedController.cs index d3a08818ea..7665100dd9 100644 --- a/Content.Shared/Physics/ConveyedController.cs +++ b/Content.Shared/Physics/ConveyedController.cs @@ -1,8 +1,6 @@ #nullable enable using Content.Shared.GameObjects.Components.Movement; using Robust.Shared.GameObjects.Components; -using Robust.Shared.Interfaces.Physics; -using Robust.Shared.IoC; using Robust.Shared.Maths; using Robust.Shared.Physics; @@ -24,7 +22,7 @@ namespace Content.Shared.Physics return; } - LinearVelocity = velocityDirection * speed * 100; + LinearVelocity = velocityDirection * speed; } public override void UpdateAfterProcessing()