diff options
author | megamage <none@none> | 2009-01-09 16:43:23 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-01-09 16:43:23 -0600 |
commit | 1ffb1cef3344206dfea149cb78146c30449d51c2 (patch) | |
tree | 655ac591f6f5aaca3dc65d67f3940f589e2394db /src/game/Object.cpp | |
parent | 5c8f52d134899e10484dd47e91b612e2228842bf (diff) | |
parent | 90a82a81ad5d20d5e7188d6e9d660280f0b1eab4 (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Object.cpp')
-rw-r--r-- | src/game/Object.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp index 7eedfdcdefb..6cd897a071d 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -1648,3 +1648,15 @@ void WorldObject::GetNearPoint(WorldObject const* searcher, float &x, float &y, UpdateGroundPositionZ(x,y,z); } + +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); +} + + |