Core/Movement: setting path length limits will now round the amount of smooth path points up instead of down to reduce edge cases in which charge effects close to their maximum cast range would return no path
This commit is contained in:
1 parent
dcc3ed4e54
commit
5cc2b41146
2 files changed
+9
-1
No files matched your search
@@ -1031,6 +1031,14 @@ bool PathGenerator::IsInvalidDestinationZ(Unit const* target) const
|
||||
return (target->GetPositionZ() - GetActualEndPosition().z) > 5.0f;
|
||||
}
|
||||
|
||||
void PathGenerator::SetPathLengthLimit(float length)
|
||||
{
|
||||
if (!(uint32(length) % 4))
|
||||
_pointPathLimit = std::min<uint32>(length / SMOOTH_PATH_STEP_SIZE, MAX_POINT_PATH_LENGTH);
|
||||
else
|
||||
_pointPathLimit = std::min<uint32>((length + SMOOTH_PATH_STEP_SIZE) / SMOOTH_PATH_STEP_SIZE, MAX_POINT_PATH_LENGTH);
|
||||
}
|
||||
|
||||
void PathGenerator::AddFarFromPolyFlags(bool startFarFromPoly, bool endFarFromPoly)
|
||||
{
|
||||
if (startFarFromPoly)
|
||||
|
||||
Reference in new issue
Block a user