From f37d6343cefc1df2de479fac3ca1f50030d46f4d Mon Sep 17 00:00:00 2001 From: Exp Date: Sat, 15 Aug 2020 20:35:02 +0200 Subject: [PATCH] Reset velocity after warp (#1680) * Reset velocity after warp * Rather than looping through the controllers manually, just call collidable.stop --- Content.Server/Administration/WarpCommand.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Content.Server/Administration/WarpCommand.cs b/Content.Server/Administration/WarpCommand.cs index 4942c6599b..e54bca1671 100644 --- a/Content.Server/Administration/WarpCommand.cs +++ b/Content.Server/Administration/WarpCommand.cs @@ -4,10 +4,12 @@ using Content.Server.GameObjects.Components.Markers; using Robust.Server.Interfaces.Console; using Robust.Server.Interfaces.Player; using Robust.Shared.Enums; +using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Map; using Robust.Shared.IoC; using Robust.Shared.Map; +using Robust.Shared.Maths; namespace Content.Server.Administration { @@ -107,6 +109,10 @@ namespace Content.Server.Administration if (found.GridID != GridId.Invalid) { player.AttachedEntity.Transform.GridPosition = found; + if (player.AttachedEntity.TryGetComponent(out ICollidableComponent collidable)) + { + collidable.Stop(); + } } else {