diff options
author | megamage <none@none> | 2009-04-11 22:41:15 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-11 22:41:15 -0500 |
commit | dda2fdff33a6d12d6e8f2913fbb439d9b670890f (patch) | |
tree | b8f581a7489ce71492ecc15a782ff08e9a5e75f6 /src/game/Object.cpp | |
parent | 1d640d02726683e73c455ddda3354cf77925a957 (diff) |
*Implement spell Disengage and Death Grip.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Object.cpp')
-rw-r--r-- | src/game/Object.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp index 7ac0ff8c8a6..5c6ecf83a02 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -1246,6 +1246,13 @@ float WorldObject::GetDistance2d(float x, float y) const return ( dist > 0 ? dist : 0); } +float WorldObject::GetExactDistance2d(const float x, const float y) const +{ + float dx = GetPositionX() - x; + float dy = GetPositionY() - y; + return sqrt((dx*dx) + (dy*dy)); +} + float WorldObject::GetDistance(const float x, const float y, const float z) const { float dx = GetPositionX() - x; |