Core/Creature: Fix formations to prevent crossover
By Malcrom
This commit is contained in:
1 parent
aebf5a172a
commit
57fabc78e4
1 file changed
+4
-3
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user