mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
Apply style fix pt3
This commit is contained in:
parent
1392c131e7
commit
d93dbd95fe
191 changed files with 9851 additions and 676 deletions
|
|
@ -189,10 +189,14 @@ void PathFinder::BuildPolyPath(const Vector3& startPos, const Vector3& endPos)
|
|||
(endPoly == INVALID_POLYREF && m_sourceUnit->GetTerrain()->IsUnderWater(endPos.x, endPos.y, endPos.z)))
|
||||
{ m_type = ((Creature*)m_sourceUnit)->CanSwim() ? PathType(PATHFIND_NORMAL | PATHFIND_NOT_USING_PATH) : PATHFIND_NOPATH; }
|
||||
else
|
||||
{ m_type = ((Creature*)m_sourceUnit)->CanFly() ? PathType(PATHFIND_NORMAL | PATHFIND_NOT_USING_PATH) : PATHFIND_NOPATH; }
|
||||
{
|
||||
m_type = ((Creature*)m_sourceUnit)->CanFly() ? PathType(PATHFIND_NORMAL | PATHFIND_NOT_USING_PATH) : PATHFIND_NOPATH;
|
||||
}
|
||||
}
|
||||
else
|
||||
{ m_type = PATHFIND_NOPATH; }
|
||||
{
|
||||
m_type = PATHFIND_NOPATH;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
@ -407,7 +411,9 @@ void PathFinder::BuildPolyPath(const Vector3& startPos, const Vector3& endPos)
|
|||
m_type = PATHFIND_NORMAL;
|
||||
}
|
||||
else
|
||||
{ m_type = PATHFIND_INCOMPLETE; }
|
||||
{
|
||||
m_type = PATHFIND_INCOMPLETE;
|
||||
}
|
||||
|
||||
// generate the point-path out of our up-to-date poly-path
|
||||
BuildPointPath(startPoint, endPoint);
|
||||
|
|
@ -719,7 +725,9 @@ dtStatus PathFinder::findSmoothPath(const float* startPos, const float* endPos,
|
|||
len = 1.0f;
|
||||
}
|
||||
else
|
||||
{ len = SMOOTH_PATH_STEP_SIZE / len; }
|
||||
{
|
||||
len = SMOOTH_PATH_STEP_SIZE / len;
|
||||
}
|
||||
|
||||
float moveTgt[VERTEX_SIZE];
|
||||
dtVmad(moveTgt, iterPos, delta, len);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue