mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-13 08:13:06 +00:00
Ignore non-3D agents in the navigator
This commit is contained in:
parent
678898b8f6
commit
08a6d9e2cf
1 changed files with 2 additions and 1 deletions
|
|
@ -18,7 +18,8 @@ namespace DetourNavigator
|
||||||
|
|
||||||
void NavigatorImpl::addAgent(const AgentBounds& agentBounds)
|
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;
|
return;
|
||||||
++mAgents[agentBounds];
|
++mAgents[agentBounds];
|
||||||
mNavMeshManager.addAgent(agentBounds);
|
mNavMeshManager.addAgent(agentBounds);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue