mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: use improve unionTraverseLinkedPolyGroups performance
Use the unsafe version of getTileAndPolyByRef instead, the refs have already been validated by the time we reach this function.
This commit is contained in:
parent
759dab221b
commit
0bcafc9928
@ -437,14 +437,10 @@ static void unionTraverseLinkedPolyGroups(const dtTraverseTableCreateParams* par
|
||||
if (link->traverseType == DT_NULL_TRAVERSE_TYPE)
|
||||
continue;
|
||||
|
||||
const dtPoly* landPoly;
|
||||
const dtMeshTile* landTile;
|
||||
const dtPoly* landPoly;
|
||||
|
||||
if (dtStatusFailed(nav->getTileAndPolyByRef(link->ref, &landTile, &landPoly)))
|
||||
{
|
||||
rdAssert(0); // Invalid traverse link generated, code bug.
|
||||
continue;
|
||||
}
|
||||
nav->getTileAndPolyByRefUnsafe(link->ref, &landTile, &landPoly);
|
||||
|
||||
rdAssert(landPoly->getType() != DT_POLYTYPE_OFFMESH_CONNECTION);
|
||||
rdAssert(landPoly->groupId != DT_UNLINKED_POLY_GROUP);
|
||||
|
Loading…
x
Reference in New Issue
Block a user