Преглед изворни кода

Make sure nodes with CrowdAgent component are excluded from nav geometry generation. Related to #1689.

Lasse Öörni пре 9 година
родитељ
комит
4144ff27c6
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      Source/Urho3D/Navigation/NavigationMesh.cpp

+ 2 - 2
Source/Urho3D/Navigation/NavigationMesh.cpp

@@ -901,8 +901,8 @@ void NavigationMesh::CollectGeometries(Vector<NavigationGeometryInfo>& geometryL
     // Make sure nodes are not included twice
     if (processedNodes.Contains(node))
         return;
-    // Exclude obstacles from consideration
-    if (node->HasComponent<Obstacle>())
+    // Exclude obstacles and crowd agents from consideration
+    if (node->HasComponent<Obstacle>() || node->HasComponent<CrowdAgent>())
         return;
     processedNodes.Insert(node);