Core/Movement: Remove random direction knockbacks and instead use unit orientation

Port From (https://github.com/TrinityCore/TrinityCore/commit/581d5146781355603d00703be2ac629286ed2e2b)
This commit is contained in:
hondacrx
2021-11-07 20:45:07 -05:00
parent 42a93c8b48
commit f766a06c8d
+3 -3
View File
@@ -332,9 +332,9 @@ namespace Game.Entities
if (Math.Abs(dx) < 0.001f && Math.Abs(dy) < 0.001f)
{
float angle = (float)RandomHelper.NextDouble() * MathFunctions.TwoPi;
vcos = (float)Math.Cos(angle);
vsin = (float)Math.Sin(angle);
float o = NormalizeOrientation(GetOrientation() - MathF.PI);
vcos = MathF.Cos(o);
vsin = MathF.Sin(o);
}
else
{