From d6be48326f11300c3e5361c4c5705b2db622b1b6 Mon Sep 17 00:00:00 2001 From: TrullyONE Date: Thu, 9 Apr 2009 01:01:57 +0300 Subject: [PATCH] Added missing z-value in Formations. --HG-- branch : trunk --- src/game/CreatureGroups.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/game/CreatureGroups.cpp b/src/game/CreatureGroups.cpp index 23f72d8981..f9271da196 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());