From de094ddacc26ea88554a668e0c43b6c35a2f2dc0 Mon Sep 17 00:00:00 2001 From: Qustinnus Date: Thu, 13 Feb 2020 16:21:29 +0100 Subject: [PATCH] Fixes the direction humans turn to when throwing something (#686) * Fixes the direction humans turn to when throwing something * shorter --- Content.Server/GameObjects/EntitySystems/HandsSystem.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Content.Server/GameObjects/EntitySystems/HandsSystem.cs b/Content.Server/GameObjects/EntitySystems/HandsSystem.cs index 94b1b2b5d7..47687fc712 100644 --- a/Content.Server/GameObjects/EntitySystems/HandsSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/HandsSystem.cs @@ -224,12 +224,7 @@ namespace Content.Server.GameObjects.EntitySystems physComp.LinearVelocity = dirVec * spd; - var wHomoDir = Vector3.UnitX; - - transform.InvWorldMatrix.Transform(ref wHomoDir, out var lHomoDir); - - lHomoDir.Normalize(); - transform.LocalRotation = new Angle(lHomoDir.Xy); + transform.LocalRotation = new Angle(dirVec).GetCardinalDir().ToAngle(); return true; }