diff options
| author | Aokromes <Aokromes@users.noreply.github.com> | 2015-09-21 22:18:34 +0200 |
|---|---|---|
| committer | Aokromes <Aokromes@users.noreply.github.com> | 2015-09-21 22:18:34 +0200 |
| commit | 57fabc78e42ad7b511ae66d12fbb824d2c8e75ee (patch) | |
| tree | f48eca154324030674936177fc2155f2123a9bad | |
| parent | aebf5a172a9e11ddae24282154f32fdc189a50c0 (diff) | |
Core/Creature: Fix formations to prevent crossover
By Malcrom
| -rw-r--r-- | src/server/game/Entities/Creature/CreatureGroups.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/game/Entities/Creature/CreatureGroups.cpp b/src/server/game/Entities/Creature/CreatureGroups.cpp index 2ccf4471788..505d41f63e7 100644 --- a/src/server/game/Entities/Creature/CreatureGroups.cpp +++ b/src/server/game/Entities/Creature/CreatureGroups.cpp @@ -228,10 +228,11 @@ void CreatureGroup::LeaderMoveTo(float x, float y, float z) if (itr->second->point_1) { - if (m_leader->GetCurrentWaypointID() == itr->second->point_1) + if (m_leader->GetCurrentWaypointID() == itr->second->point_1 - 1) itr->second->follow_angle = (2 * float(M_PI)) - itr->second->follow_angle; - if (m_leader->GetCurrentWaypointID() == itr->second->point_2) - itr->second->follow_angle = (2 * float(M_PI)) + itr->second->follow_angle; + + if (m_leader->GetCurrentWaypointID() == itr->second->point_2 - 1) + itr->second->follow_angle = (float(M_PI)) + itr->second->follow_angle; } float angle = itr->second->follow_angle; |
