Fix server crashing when portal is deleted (#2157)

-Fix server crashing when using the teleporter
This commit is contained in:
Exp
2020-10-01 13:48:42 +02:00
committed by GitHub
parent 155882f469
commit f0cb9f05ee
2 changed files with 5 additions and 3 deletions

View File

@@ -222,7 +222,7 @@ namespace Content.Server.GameObjects.Components.Movement
public void Teleport(IEntity user, Vector2 vector)
{
// Messy maybe?
var targetGrid = user.ToCoordinates(vector);
var targetGrid = user.Transform.Coordinates.WithPosition(vector);
var soundPlayer = EntitySystem.Get<AudioSystem>();
// If portals use those, otherwise just move em over