Add assert check for graph.xml
This commit is contained in:
parent
23a49d5245
commit
9d41f4b429
@ -66,6 +66,7 @@ namespace irr
|
||||
* stage) identical to the Skidding AI.
|
||||
\ingroup controller
|
||||
*/
|
||||
|
||||
class TestAI : public AIBaseLapController
|
||||
{
|
||||
private:
|
||||
|
@ -95,14 +95,6 @@ NavMesh::NavMesh(const std::string &filename)
|
||||
m_quads.push_back(new Quad(
|
||||
all_vertices[quad_index[0]], all_vertices[quad_index[1]],
|
||||
all_vertices[quad_index[2]], all_vertices[quad_index[3]]));
|
||||
|
||||
/*(AbstractNode* tn = createNode(
|
||||
all_vertices[quad_index[0]], all_vertices[quad_index[1]],
|
||||
all_vertices[quad_index[2]], all_vertices[quad_index[3]],false,false);
|
||||
|
||||
Vec3 pp(0,0,0);
|
||||
tn->pointInNode(pp);*/
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -223,6 +223,9 @@ void QuadGraph::load(const std::string &quad_file_name,
|
||||
if(xml_node->getName()=="node-list")
|
||||
{
|
||||
// Each quad is part of the graph exactly once now.
|
||||
unsigned int to = 0;
|
||||
xml_node->get("to-quad", &to);
|
||||
assert(to + 1 == m_all_nodes.size());
|
||||
continue;
|
||||
}
|
||||
else if(xml_node->getName()=="edge-loop")
|
||||
|
Loading…
x
Reference in New Issue
Block a user