Core/Auras: Prevent remove of auras interrupted by turning if the turn could be caused by float calculation error (#18595)

(cherry-picked from 38f9919a37e0a3f17c454d4353d9ff2b79382e6b)
This commit is contained in:
xinef1
2018-12-09 14:18:42 +01:00
committed by Shauren
parent 8573b651c8
commit 4afee01b01
+2 -1
View File
@@ -12892,7 +12892,8 @@ bool Unit::UpdatePosition(float x, float y, float z, float orientation, bool tel
return false;
}
bool const turn = (GetOrientation() != orientation);
// Check if angular distance changed
bool const turn = G3D::fuzzyGt(M_PI - fabs(fabs(GetOrientation() - orientation) - M_PI), 0.0f);
// G3D::fuzzyEq won't help here, in some cases magnitudes differ by a little more than G3D::eps, but should be considered equal
bool const relocated = (teleport ||