diff options
author | TrullyONE <none@none> | 2009-04-09 01:01:57 +0300 |
---|---|---|
committer | TrullyONE <none@none> | 2009-04-09 01:01:57 +0300 |
commit | d6be48326f11300c3e5361c4c5705b2db622b1b6 (patch) | |
tree | 47cb1664600f60879792755fbaa85940291e531d /src | |
parent | f3cc13d28ce1bdb38fdb60459f9470ed73494b7b (diff) |
Added missing z-value in Formations.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/CreatureGroups.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game/CreatureGroups.cpp b/src/game/CreatureGroups.cpp index 23f72d89816..f9271da1967 100644 --- a/src/game/CreatureGroups.cpp +++ b/src/game/CreatureGroups.cpp @@ -245,8 +245,13 @@ void CreatureGroup::LeaderMoveTo(float x, float y, float z) float dx = x + cos(angle + pathangle) * dist; float dy = y + sin(angle + pathangle) * dist; - float dz; - member->UpdateGroundPositionZ(dx, dy, dz); + + Trinity::NormalizeMapCoord(dx); + Trinity::NormalizeMapCoord(dy); + + float dz = member->GetMap()->GetHeight(dx,dy,z,false); + + member->UpdateGroundPositionZ(dx, dy, dz); if(member->GetDistance(m_leader) < dist + MAX_DESYNC) member->SetUnitMovementFlags(m_leader->GetUnitMovementFlags()); |