From 53efa9224f5f96340edd813d8e40182c2dbf3f5a Mon Sep 17 00:00:00 2001 From: hondacrx Date: Mon, 12 Mar 2018 13:32:55 -0400 Subject: [PATCH] Core/Entities: don't absolute compare positions on UpdatePosition --- Source/Game/Entities/Unit/Unit.Movement.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Game/Entities/Unit/Unit.Movement.cs b/Source/Game/Entities/Unit/Unit.Movement.cs index c5b9893f4..120f5cd17 100644 --- a/Source/Game/Entities/Unit/Unit.Movement.cs +++ b/Source/Game/Entities/Unit/Unit.Movement.cs @@ -544,7 +544,11 @@ namespace Game.Entities } bool turn = (GetOrientation() != orientation); - bool relocated = (teleport || GetPositionX() != x || GetPositionY() != y || GetPositionZ() != z); + // G3D::fuzzyEq won't help here, in some cases magnitudes differ by a little more than G3D::eps, but should be considered equal + bool relocated = (teleport || + Math.Abs(GetPositionX() - x) > 0.001f || + Math.Abs(GetPositionY() - y) > 0.001f || + Math.Abs(GetPositionZ() - z) > 0.001f); if (turn) RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Turning);