1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-07-01 02:41:37 +00:00

Ignore non-3D agents in the navigator

This commit is contained in:
Evil Eye 2022-12-09 16:43:15 +01:00
parent 678898b8f6
commit 08a6d9e2cf

View file

@ -18,7 +18,8 @@ namespace DetourNavigator
void NavigatorImpl::addAgent(const AgentBounds& agentBounds)
{
if(agentBounds.mHalfExtents.length2() <= 0)
if (agentBounds.mHalfExtents.x() == 0.f || agentBounds.mHalfExtents.y() == 0.f
|| agentBounds.mHalfExtents.z() == 0.f)
return;
++mAgents[agentBounds];
mNavMeshManager.addAgent(agentBounds);