mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-17 16:10:49 +01:00
Core/Creature: Better formations implementation
By Malcrom
This commit is contained in:
@@ -227,15 +227,8 @@ void CreatureGroup::LeaderMoveTo(float x, float y, float z)
|
||||
continue;
|
||||
|
||||
if (itr->second->point_1)
|
||||
{
|
||||
if (m_leader->GetCurrentWaypointID() == itr->second->point_1 - 1 || m_leader->GetCurrentWaypointID() == itr->second->point_2 - 1)
|
||||
{
|
||||
if (itr->second->follow_angle > float(M_PI))
|
||||
itr->second->follow_angle = itr->second->follow_angle - float(M_PI);
|
||||
else
|
||||
itr->second->follow_angle = itr->second->follow_angle + float(M_PI);
|
||||
}
|
||||
}
|
||||
itr->second->follow_angle = float(M_PI) * 2 - itr->second->follow_angle;
|
||||
|
||||
float angle = itr->second->follow_angle;
|
||||
float dist = itr->second->follow_dist;
|
||||
|
||||
Reference in New Issue
Block a user