diff options
author | Neo2003 <none@none> | 2008-10-08 13:37:00 -0500 |
---|---|---|
committer | Neo2003 <none@none> | 2008-10-08 13:37:00 -0500 |
commit | 28ee57b14c8f55e9f60f731a48ffe150b61aa53e (patch) | |
tree | 2f37663253ace4f77364e5e4c7acaac8d4186e83 | |
parent | 32df4d30a10f8dab727d5b9ed3184cd6cf6fcbf8 (diff) |
[svn] * Another small fix in Random Movement Generator because of Normalized Map Coords
--HG--
branch : trunk
-rw-r--r-- | src/game/RandomMovementGenerator.cpp | 2 |
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)
{
|