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:
@@ -332,9 +332,9 @@ namespace Game.Entities
|
|||||||
|
|
||||||
if (Math.Abs(dx) < 0.001f && Math.Abs(dy) < 0.001f)
|
if (Math.Abs(dx) < 0.001f && Math.Abs(dy) < 0.001f)
|
||||||
{
|
{
|
||||||
float angle = (float)RandomHelper.NextDouble() * MathFunctions.TwoPi;
|
float o = NormalizeOrientation(GetOrientation() - MathF.PI);
|
||||||
vcos = (float)Math.Cos(angle);
|
vcos = MathF.Cos(o);
|
||||||
vsin = (float)Math.Sin(angle);
|
vsin = MathF.Sin(o);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user