mirror of
https://github.com/recastnavigation/recastnavigation.git
synced 2026-10-03 15:35:29 +00:00
Add exit condition to raycast() if DT_BUFFER_TOO_SMALL (#753)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user