Change player's facing when they click on something (#598)

This commit is contained in:
Tad Hardesty
2020-02-07 08:54:56 -08:00
committed by GitHub
parent d8afa6bc03
commit 89a4265dda

View File

@@ -17,6 +17,7 @@ using Robust.Shared.Interfaces.Map;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Log; using Robust.Shared.Log;
using Robust.Shared.Map; using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Players; using Robust.Shared.Players;
namespace Content.Server.GameObjects.EntitySystems namespace Content.Server.GameObjects.EntitySystems
@@ -409,6 +410,8 @@ namespace Content.Server.GameObjects.EntitySystems
return; return;
} }
playerTransform.LocalRotation = new Angle(coordinates.ToMapPos(_mapManager) - playerTransform.MapPosition.Position);
// TODO: Check if client should be able to see that object to click on it in the first place // TODO: Check if client should be able to see that object to click on it in the first place
// Clicked on empty space behavior, try using ranged attack // Clicked on empty space behavior, try using ranged attack