1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-30 16:20:21 +00:00

Merge branch 'drippy' into 'master'

Ignore non-3D agents in the navigator

Closes #7093

See merge request OpenMW/openmw!2537
This commit is contained in:
psi29a 2022-12-19 21:51:38 +00:00
commit df92d76536

View File

@ -16,7 +16,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);