mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Core/Movement: MoveSmoothPath will now automatically flag a ground path as uncompressed when the delta is > 400
This commit is contained in:
@@ -530,8 +530,24 @@ void MotionMaster::MoveSmoothPath(uint32 pointId, Position const* pathPoints, si
|
||||
if (fly)
|
||||
{
|
||||
init.SetFly();
|
||||
init.SetUncompressed();
|
||||
init.SetSmooth();
|
||||
init.SetUncompressed();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pathSize > 1)
|
||||
{
|
||||
G3D::Vector3 middle = (path[0] + path[pathSize]) / 2.f;
|
||||
for (uint32 i = 1; i < pathSize; ++i)
|
||||
{
|
||||
G3D::Vector3 delta = middle - path[i];
|
||||
if (delta.x > 400 || delta.y > 400 || delta.z > 400)
|
||||
{
|
||||
init.SetUncompressed();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (velocity > 0.0f)
|
||||
|
||||
Reference in New Issue
Block a user