mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
Check dtNavMeshQuery::getPolyHeight status
Otherwise when it fails a node with zero height will be added to a path.
This commit is contained in:
parent
7e1630a7ad
commit
793c30ab8d
@ -241,7 +241,8 @@ namespace DetourNavigator
|
||||
}
|
||||
}
|
||||
|
||||
navMeshQuery.getPolyHeight(polygonPath.front(), result->mResultPos.ptr(), &iterPos.y());
|
||||
if (dtStatusFailed(navMeshQuery.getPolyHeight(polygonPath.front(), result->mResultPos.ptr(), &iterPos.y())))
|
||||
return Status::GetPolyHeightFailed;
|
||||
iterPos.x() = result->mResultPos.x();
|
||||
iterPos.z() = result->mResultPos.z();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user