mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 06:39:42 +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
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue