Conveyors now tickrate agnostic (#1618)

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
metalgearsloth
2020-08-08 20:34:28 +10:00
committed by GitHub
parent 228702c9e1
commit 322c2261b6
2 changed files with 3 additions and 3 deletions

View File

@@ -136,7 +136,7 @@ namespace Content.Server.GameObjects.Components.Conveyor
return true; return true;
} }
public void Update() public void Update(float frameTime)
{ {
if (!CanRun()) if (!CanRun())
{ {
@@ -156,7 +156,7 @@ namespace Content.Server.GameObjects.Components.Conveyor
if (entity.TryGetComponent(out ICollidableComponent collidable)) if (entity.TryGetComponent(out ICollidableComponent collidable))
{ {
var controller = collidable.EnsureController<ConveyedController>(); var controller = collidable.EnsureController<ConveyedController>();
controller.Move(direction, _speed); controller.Move(direction, _speed * frameTime);
} }
} }
} }

View File

@@ -27,7 +27,7 @@ namespace Content.Server.GameObjects.EntitySystems
continue; continue;
} }
conveyor.Update(); conveyor.Update(frameTime);
} }
} }
} }