From 28ee57b14c8f55e9f60f731a48ffe150b61aa53e Mon Sep 17 00:00:00 2001 From: Neo2003 Date: Wed, 8 Oct 2008 13:37:00 -0500 Subject: [svn] * Another small fix in Random Movement Generator because of Normalized Map Coords --HG-- branch : trunk --- src/game/RandomMovementGenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/game/RandomMovementGenerator.cpp') diff --git a/src/game/RandomMovementGenerator.cpp b/src/game/RandomMovementGenerator.cpp index 754e76d8267..15273843ffc 100644 --- a/src/game/RandomMovementGenerator.cpp +++ b/src/game/RandomMovementGenerator.cpp @@ -54,7 +54,7 @@ RandomMovementGenerator::_setRandomLocation(Creature &creature) MaNGOS::NormalizeMapCoord(nx); MaNGOS::NormalizeMapCoord(ny); - dist = distanceX*distanceX + distanceY*distanceY; + dist = (nx - X)*(nx - X) + (ny - Y)*(ny - Y); if (is_air_ok) // 3D system above ground and above water (flying mode) { -- cgit v1.2.3