Recast: fix infinite loop in dtNavMeshQuery::raycast()

Status changes, but the code never acts accordingly on the new status.
This commit is contained in:
Kawe Mazidjatari 2025-02-02 15:00:19 +01:00
parent 56aba36b8c
commit 5a6c655196

View File

@ -2712,6 +2712,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;