crash fix follow-up

(cherry picked from commit 6939f4eb7b)
This commit is contained in:
Treeston
2018-04-01 18:34:13 +02:00
committed by Shauren
parent f69d12504c
commit fc05aba0d4

View File

@@ -2990,7 +2990,7 @@ void WorldObject::GetNearPoint2D(WorldObject const* searcher, float &x, float &y
float hoverDelta = myHover - searcherHover;
if (hoverDelta != 0.0f)
effectiveReach = std::sqrt(effectiveReach * effectiveReach - hoverDelta * hoverDelta);
effectiveReach = std::sqrt(std::max(effectiveReach * effectiveReach - hoverDelta * hoverDelta, 0.0f));
}
}