Merge branch 'main' into moreMovementAi

This commit is contained in:
David Markowitz
2023-08-12 21:57:07 -07:00
157 changed files with 559 additions and 666 deletions

View File

@@ -137,9 +137,11 @@ float dNavMesh::GetHeightAtPoint(const NiPoint3& location, const float halfExten
auto hasPoly = m_NavQuery->findNearestPoly(pos, polyPickExt, &filter, &nearestRef, nearestPoint);
m_NavQuery->getPolyHeight(nearestRef, pos, &toReturn);
#ifdef _DEBUG
if (toReturn != 0.0f) {
DluAssert(toReturn == nearestPoint[1]);
}
#endif
if (toReturn == 0.0f) {
// If we were unable to get the poly height, but the query returned a success, just use the height of the nearest point.
// This is what seems to happen anyways and it is better than returning zero.