mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: move on to next tile if all links are utilized.
Major performance optimization.
This commit is contained in:
parent
b1033b2367
commit
965647ae40
@ -772,15 +772,15 @@ void Editor::connectTileTraverseLinks(dtMeshTile* const baseTile, const bool lin
|
||||
// space for 2 links in the same tile.
|
||||
const unsigned int forwardIdx = baseTile->allocLink();
|
||||
|
||||
if (forwardIdx == DT_NULL_LINK) // TODO: should move on to next tile.
|
||||
continue;
|
||||
if (forwardIdx == DT_NULL_LINK)
|
||||
return; // Move on to next base tile.
|
||||
|
||||
const unsigned int reverseIdx = landTile->allocLink();
|
||||
|
||||
if (reverseIdx == DT_NULL_LINK) // TODO: should move on to next tile.
|
||||
if (reverseIdx == DT_NULL_LINK)
|
||||
{
|
||||
baseTile->freeLink(forwardIdx);
|
||||
continue;
|
||||
break; // Move on to next neighbor tile.
|
||||
}
|
||||
|
||||
dtLink* const forwardLink = &baseTile->links[forwardIdx];
|
||||
|
Loading…
x
Reference in New Issue
Block a user