aboutsummaryrefslogtreecommitdiff
path: root/src/game/Object.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-08 14:22:15 -0600
committermegamage <none@none>2009-01-08 14:22:15 -0600
commit08bb6082d96792bc02ef6275a1f84f9a5eacd529 (patch)
tree3931475a58f42bd0d0bf8054309427d68d3d3885 /src/game/Object.cpp
parent7028dfd1b12dac7dd3a037ff53568445ba36abf0 (diff)
*Update of spell target selection.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Object.cpp')
-rw-r--r--src/game/Object.cpp14
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);
+}
+
+