diff options
author | megamage <none@none> | 2009-01-08 14:22:15 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-01-08 14:22:15 -0600 |
commit | 08bb6082d96792bc02ef6275a1f84f9a5eacd529 (patch) | |
tree | 3931475a58f42bd0d0bf8054309427d68d3d3885 /src/game/Object.cpp | |
parent | 7028dfd1b12dac7dd3a037ff53568445ba36abf0 (diff) |
*Update of spell target selection.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Object.cpp')
-rw-r--r-- | src/game/Object.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp index 51eea6ecc83..160c32e5f03 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -1620,4 +1620,16 @@ void WorldObject::GetNearPoint(WorldObject const* searcher, float &x, float &y, z = GetPositionZ(); UpdateGroundPositionZ(x,y,z); -}
\ No newline at end of file +} + +void WorldObject::GetClosePointAt(float &x, float &y, float &z, float dist, float angle) +{ + angle += GetOrientation(); + x += dist * cos(angle); + y += dist * sin(angle); + Trinity::NormalizeMapCoord(x); + Trinity::NormalizeMapCoord(y); + UpdateGroundPositionZ(x, y, z); +} + + |