diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Object.cpp | 2 | ||||
-rw-r--r-- | src/game/Object.h | 6 | ||||
-rw-r--r-- | src/game/Spell.cpp | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp index 160c32e5f03..6d6cbb4f865 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -1622,7 +1622,7 @@ 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) +void WorldObject::GetGroundPoint(float &x, float &y, float &z, float dist, float angle) { angle += GetOrientation(); x += dist * cos(angle); diff --git a/src/game/Object.h b/src/game/Object.h index 9314b032f18..ad56e687733 100644 --- a/src/game/Object.h +++ b/src/game/Object.h @@ -394,11 +394,11 @@ class TRINITY_DLL_SPEC WorldObject : public Object // angle calculated from current orientation GetNearPoint(NULL,x,y,z,size,distance2d,GetOrientation() + angle); } - void GetClosePointAt(float &x, float &y, float &z, float dist, float angle); - void GetClosePoint(float &x, float &y, float &z, float dist, float angle) + void GetGroundPoint(float &x, float &y, float &z, float dist, float angle); + void GetGroundPointAroundUnit(float &x, float &y, float &z, float dist, float angle) { GetPosition(x, y, z); - GetClosePointAt(x, y, z, dist, angle); + GetGroundPoint(x, y, z, dist, angle); } void GetContactPoint( const WorldObject* obj, float &x, float &y, float &z, float distance2d = CONTACT_DISTANCE) const { diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 88b8b0e722e..aa0d24ffdb8 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1911,7 +1911,7 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap) default: angle = rand_norm()*2*M_PI; break; } - m_caster->GetClosePoint(x, y, z, dist, angle); + m_caster->GetGroundPointAroundUnit(x, y, z, dist, angle); m_targets.setDestination(x, y, z); // do not know if has ground visual }break; @@ -1957,7 +1957,7 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap) default: angle = rand_norm()*2*M_PI; break; } - target->GetClosePoint(x, y, z, dist, angle); + target->GetGroundPointAroundUnit(x, y, z, dist, angle); m_targets.setDestination(x, y, z); // do not know if has ground visual }break; @@ -1994,7 +1994,7 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap) x = m_targets.m_destX; y = m_targets.m_destY; z = m_targets.m_destZ; - m_caster->GetClosePointAt(x, y, z, dist, angle); + m_caster->GetGroundPoint(x, y, z, dist, angle); m_targets.setDestination(x, y, z); // do not know if has ground visual }break; |