Add exit condition to raycast() if DT_BUFFER_TOO_SMALL (#753)

This commit is contained in:
Zach Toogood
2025-03-18 16:46:28 +00:00
committed by GitHub
parent 2253271091
commit 0096f0dae9

View File

@@ -2681,6 +2681,12 @@ dtStatus dtNavMeshQuery::raycast(dtPolyRef startRef, const float* startPos, cons
tile = nextTile;
prevPoly = poly;
poly = nextPoly;
if (status & DT_BUFFER_TOO_SMALL)
{
status |= DT_PARTIAL_RESULT;
break;
}
}
hit->pathCount = n;