mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: update dtLink variable names and assignments
Light cleanup and added new names and documentation of what's currently know.
This commit is contained in:
parent
12f39f1c44
commit
fce53b6eed
@ -179,7 +179,7 @@ static void drawTraverseLinks(duDebugDraw* dd, const dtNavMesh& mesh, const dtNa
|
|||||||
dd->vertex(startPos, col);
|
dd->vertex(startPos, col);
|
||||||
dd->vertex(endPos, col);
|
dd->vertex(endPos, col);
|
||||||
|
|
||||||
const bool hasReverseLink = link->reverseLinkIndex != DT_NULL_TRAVERSE_REVERSE_LINK;
|
const bool hasReverseLink = link->reverseLink != DT_NULL_TRAVERSE_REVERSE_LINK;
|
||||||
|
|
||||||
if (hasReverseLink)
|
if (hasReverseLink)
|
||||||
{
|
{
|
||||||
|
@ -269,9 +269,9 @@ struct dtLink
|
|||||||
unsigned char side; ///< If a boundary link, defines on which side the link is.
|
unsigned char side; ///< If a boundary link, defines on which side the link is.
|
||||||
unsigned char bmin; ///< If a boundary link, defines the minimum sub-edge area.
|
unsigned char bmin; ///< If a boundary link, defines the minimum sub-edge area.
|
||||||
unsigned char bmax; ///< If a boundary link, defines the maximum sub-edge area.
|
unsigned char bmax; ///< If a boundary link, defines the maximum sub-edge area.
|
||||||
unsigned char jumpType;
|
unsigned char traverseType; ///< The traverse type for this link. (Jumping, climbing, etc.)
|
||||||
unsigned char otherUnk;
|
unsigned char traverseDist; ///< The traverse distance of this link. (Quantized by #DT_TRAVERSE_DIST_QUANT_FACTOR).
|
||||||
unsigned short reverseLinkIndex;
|
unsigned short reverseLink; ///< The reverse traversal link for this link. (Path returns through this link.)
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Bounding volume node.
|
/// Bounding volume node.
|
||||||
|
@ -464,9 +464,9 @@ void dtNavMesh::connectExtLinks(dtMeshTile* tile, dtMeshTile* target, int side)
|
|||||||
link->next = poly->firstLink;
|
link->next = poly->firstLink;
|
||||||
poly->firstLink = idx;
|
poly->firstLink = idx;
|
||||||
|
|
||||||
link->jumpType = 0xFF;
|
link->jumpType = DT_NULL_TRAVERSE_TYPE;
|
||||||
link->otherUnk = 0;
|
link->jumpDist = 0;
|
||||||
link->reverseLinkIndex = 0xFFFF;
|
link->reverseLink = DT_NULL_TRAVERSE_REVERSE_LINK;
|
||||||
|
|
||||||
// Compress portal limits to a byte value.
|
// Compress portal limits to a byte value.
|
||||||
if (dir == 0 || dir == 4)
|
if (dir == 0 || dir == 4)
|
||||||
@ -540,9 +540,9 @@ void dtNavMesh::connectExtOffMeshLinks(dtMeshTile* tile, dtMeshTile* target, int
|
|||||||
// Add to linked list.
|
// Add to linked list.
|
||||||
link->next = targetPoly->firstLink;
|
link->next = targetPoly->firstLink;
|
||||||
targetPoly->firstLink = idx;
|
targetPoly->firstLink = idx;
|
||||||
link->jumpType = 0xFF;
|
link->jumpType = DT_NULL_TRAVERSE_TYPE;
|
||||||
link->otherUnk = 0;
|
link->jumpDist = 0;
|
||||||
link->reverseLinkIndex = 0xFFFF;
|
link->reverseLink = DT_NULL_TRAVERSE_REVERSE_LINK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Link target poly to off-mesh connection.
|
// Link target poly to off-mesh connection.
|
||||||
@ -563,9 +563,9 @@ void dtNavMesh::connectExtOffMeshLinks(dtMeshTile* tile, dtMeshTile* target, int
|
|||||||
// Add to linked list.
|
// Add to linked list.
|
||||||
tlink->next = landPoly->firstLink;
|
tlink->next = landPoly->firstLink;
|
||||||
landPoly->firstLink = tidx;
|
landPoly->firstLink = tidx;
|
||||||
tlink->jumpType = 0xFF;
|
tlink->jumpType = DT_NULL_TRAVERSE_TYPE;
|
||||||
tlink->otherUnk = 0;
|
tlink->jumpDist = 0;
|
||||||
tlink->reverseLinkIndex = 0xFFFF;
|
tlink->reverseLink = DT_NULL_TRAVERSE_REVERSE_LINK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -612,9 +612,9 @@ void dtNavMesh::connectIntLinks(dtMeshTile* tile)
|
|||||||
// Add to linked list.
|
// Add to linked list.
|
||||||
link->next = poly->firstLink;
|
link->next = poly->firstLink;
|
||||||
poly->firstLink = idx;
|
poly->firstLink = idx;
|
||||||
link->jumpType = 0xFF;
|
link->jumpType = DT_NULL_TRAVERSE_TYPE;
|
||||||
link->otherUnk = 0;
|
link->jumpDist = 0;
|
||||||
link->reverseLinkIndex = 0xFFFF;
|
link->reverseLink = DT_NULL_TRAVERSE_REVERSE_LINK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -658,9 +658,9 @@ void dtNavMesh::baseOffMeshLinks(dtMeshTile* tile)
|
|||||||
// Add to linked list.
|
// Add to linked list.
|
||||||
link->next = poly->firstLink;
|
link->next = poly->firstLink;
|
||||||
poly->firstLink = idx;
|
poly->firstLink = idx;
|
||||||
link->jumpType = 0xFF;
|
link->jumpType = DT_NULL_TRAVERSE_TYPE;
|
||||||
link->otherUnk = 0;
|
link->jumpDist = 0;
|
||||||
link->reverseLinkIndex = 0xFFFF;
|
link->reverseLink = DT_NULL_TRAVERSE_REVERSE_LINK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start end-point is always connect back to off-mesh connection.
|
// Start end-point is always connect back to off-mesh connection.
|
||||||
@ -677,9 +677,9 @@ void dtNavMesh::baseOffMeshLinks(dtMeshTile* tile)
|
|||||||
// Add to linked list.
|
// Add to linked list.
|
||||||
link->next = landPoly->firstLink;
|
link->next = landPoly->firstLink;
|
||||||
landPoly->firstLink = tidx;
|
landPoly->firstLink = tidx;
|
||||||
link->jumpType = 0xFF;
|
link->jumpType = DT_NULL_TRAVERSE_TYPE;
|
||||||
link->otherUnk = 0;
|
link->jumpDist = 0;
|
||||||
link->reverseLinkIndex = 0xFFFF;
|
link->reverseLink = DT_NULL_TRAVERSE_REVERSE_LINK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user