mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: ignore off-mesh links for traverse links
Do not link or union off-mesh links to traverse links.
This commit is contained in:
parent
cf6d3f3dcf
commit
739d590574
@ -794,6 +794,9 @@ void Editor::connectTileTraverseLinks(dtMeshTile* const baseTile, const bool lin
|
||||
if (basePoly->groupId == DT_UNLINKED_POLY_GROUP)
|
||||
continue;
|
||||
|
||||
if (basePoly->getType() == DT_POLYTYPE_OFFMESH_CONNECTION)
|
||||
continue;
|
||||
|
||||
for (int j = 0; j < basePoly->vertCount; ++j)
|
||||
{
|
||||
// Hard edges only!
|
||||
@ -868,6 +871,9 @@ void Editor::connectTileTraverseLinks(dtMeshTile* const baseTile, const bool lin
|
||||
if (landPoly->groupId == DT_UNLINKED_POLY_GROUP)
|
||||
continue;
|
||||
|
||||
if (landPoly->getType() == DT_POLYTYPE_OFFMESH_CONNECTION)
|
||||
continue;
|
||||
|
||||
for (int m = 0; m < landPoly->vertCount; ++m)
|
||||
{
|
||||
if (landPoly->neis[m] != 0)
|
||||
|
@ -426,6 +426,9 @@ static void unionTraverseLinkedPolyGroups(const dtTraverseTableCreateParams* par
|
||||
{
|
||||
dtPoly& poly = tile->polys[j];
|
||||
|
||||
if (poly.getType() == DT_POLYTYPE_OFFMESH_CONNECTION)
|
||||
continue;
|
||||
|
||||
for (int k = poly.firstLink; k != DT_NULL_LINK; k = tile->links[k].next)
|
||||
{
|
||||
const dtLink* link = &tile->links[k];
|
||||
@ -434,13 +437,6 @@ static void unionTraverseLinkedPolyGroups(const dtTraverseTableCreateParams* par
|
||||
if (link->traverseType == DT_NULL_TRAVERSE_TYPE)
|
||||
continue;
|
||||
|
||||
// note(amos): here we want to possible change several things up.
|
||||
// Ideally we create a disjoint set for each anim type (5 for small,
|
||||
// 1 for everything beyond) and determine the traversability here
|
||||
// with use of a lookup table that has to be made still.
|
||||
// Anim type 0 (HUMAN) for example, cannot jump as high as anim type
|
||||
// 2 (STALKER).
|
||||
|
||||
const dtPoly* landPoly;
|
||||
const dtMeshTile* landTile;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user