Reset velocity after warp (#1680)
* Reset velocity after warp * Rather than looping through the controllers manually, just call collidable.stop
This commit is contained in:
@@ -4,10 +4,12 @@ using Content.Server.GameObjects.Components.Markers;
|
|||||||
using Robust.Server.Interfaces.Console;
|
using Robust.Server.Interfaces.Console;
|
||||||
using Robust.Server.Interfaces.Player;
|
using Robust.Server.Interfaces.Player;
|
||||||
using Robust.Shared.Enums;
|
using Robust.Shared.Enums;
|
||||||
|
using Robust.Shared.GameObjects.Components;
|
||||||
using Robust.Shared.Interfaces.GameObjects;
|
using Robust.Shared.Interfaces.GameObjects;
|
||||||
using Robust.Shared.Interfaces.Map;
|
using Robust.Shared.Interfaces.Map;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Maths;
|
||||||
|
|
||||||
namespace Content.Server.Administration
|
namespace Content.Server.Administration
|
||||||
{
|
{
|
||||||
@@ -107,6 +109,10 @@ namespace Content.Server.Administration
|
|||||||
if (found.GridID != GridId.Invalid)
|
if (found.GridID != GridId.Invalid)
|
||||||
{
|
{
|
||||||
player.AttachedEntity.Transform.GridPosition = found;
|
player.AttachedEntity.Transform.GridPosition = found;
|
||||||
|
if (player.AttachedEntity.TryGetComponent(out ICollidableComponent collidable))
|
||||||
|
{
|
||||||
|
collidable.Stop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user