Apply style fix pt5

This commit is contained in:
Antz 2020-01-14 13:12:16 +00:00
parent 4727d8846f
commit 1a1110b4f7
67 changed files with 648 additions and 214 deletions

View file

@ -462,7 +462,9 @@ void PathFinder::BuildPointPath(const float* startPoint, const float* endPoint)
m_pathPoints.resize(pointCount);
for (uint32 i = 0; i < pointCount; ++i)
{ m_pathPoints[i] = Vector3(pathPoints[i * VERTEX_SIZE + 2], pathPoints[i * VERTEX_SIZE], pathPoints[i * VERTEX_SIZE + 1]); }
{
m_pathPoints[i] = Vector3(pathPoints[i * VERTEX_SIZE + 2], pathPoints[i * VERTEX_SIZE], pathPoints[i * VERTEX_SIZE + 1]);
}
// first point is always our current location - we need the next one
setActualEndPosition(m_pathPoints[pointCount - 1]);
@ -625,7 +627,9 @@ uint32 PathFinder::fixupCorridor(dtPolyRef* path, uint32 npath, uint32 maxPath,
// Store visited
for (uint32 i = 0; i < req; ++i)
{ path[i] = visited[(nvisited - 1) - i]; }
{
path[i] = visited[(nvisited - 1) - i];
}
return req + size;
}
@ -771,7 +775,9 @@ dtStatus PathFinder::findSmoothPath(const float* startPos, const float* endPos,
}
for (uint32 i = npos; i < npolys; ++i)
{ polys[i - npos] = polys[i]; }
{
polys[i - npos] = polys[i];
}
npolys -= npos;
@ -829,7 +835,9 @@ float PathFinder::dist3DSqr(const Vector3& p1, const Vector3& p2) const
void PathFinder::NormalizePath(uint32& size)
{
for (uint32 i = 0; i < m_pathPoints.size(); ++i)
{ m_sourceUnit->UpdateAllowedPositionZ(m_pathPoints[i].x, m_pathPoints[i].y, m_pathPoints[i].z); }
{
m_sourceUnit->UpdateAllowedPositionZ(m_pathPoints[i].x, m_pathPoints[i].y, m_pathPoints[i].z);
}
// check if the Z difference between each point is higher than SMOOTH_PATH_HEIGHT.
// add another point if that's the case and keep adding new midpoints till the Z difference is low enough