aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeo2003 <none@none>2008-10-08 13:37:00 -0500
committerNeo2003 <none@none>2008-10-08 13:37:00 -0500
commit28ee57b14c8f55e9f60f731a48ffe150b61aa53e (patch)
tree2f37663253ace4f77364e5e4c7acaac8d4186e83
parent32df4d30a10f8dab727d5b9ed3184cd6cf6fcbf8 (diff)
[svn] * Another small fix in Random Movement Generator because of Normalized Map Coords
--HG-- branch : trunk
-rw-r--r--src/game/RandomMovementGenerator.cpp2
1 files changed, 1 insertions, 1 deletions
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<Creature>::_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)
{