aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-14 16:50:47 -0500
committermegamage <none@none>2009-05-14 16:50:47 -0500
commit047cc95388a67d5f33cb86082bbef03f654acec1 (patch)
tree90547d4892aa217a58408b3353fe943dcc51bb7b /src/game/Player.cpp
parent811eee356ddd3c0b486a828b39822daffd8ac97e (diff)
*Add some distance check functions. By VladimirMangos.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index e7fab7ac107..a68002445bc 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -1673,7 +1673,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
if (!(options & TELE_TO_NOT_UNSUMMON_PET))
{
//same map, only remove pet if out of range for new position
- if(pet && pet->GetDistance(x,y,z) >= OWNER_MAX_DISTANCE)
+ if(pet && !pet->IsWithinDist3d(x,y,z, OWNER_MAX_DISTANCE))
UnsummonPetTemporaryIfAny();
}