diff options
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); +} + + |