From 08bb6082d96792bc02ef6275a1f84f9a5eacd529 Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 8 Jan 2009 14:22:15 -0600 Subject: *Update of spell target selection. --HG-- branch : trunk --- src/game/Object.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/game/Object.cpp') 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); +} + + -- cgit v1.2.3