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

This commit is contained in:
xinef1 authored and Aokromes committed 2017-01-21 14:50:15 +01:00
1 parent adfdc05d42
commit 696ac52f83
1 file changed
+2 -1
+2 -1
View File
@@ -16232,7 +16232,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 ||