Added support for edge-line tag in graph files (which were already generated from the

track exporter, but not actually supported from STK).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4038 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2009-09-22 13:26:13 +00:00
parent a9d9ca4234
commit 31324e54e6

View File

@ -142,6 +142,17 @@ void QuadGraph::load(const std::string &filename)
m_all_nodes[i]->addSuccessor(i!=to ? i+1 : from);
}
}
else if(xml_node->getName()=="edge-line")
{
// A line:
unsigned int from, to;
xml_node->get("from", &from);
xml_node->get("to", &to);
for(unsigned int i=from; i<to; i++)
{
m_all_nodes[i]->addSuccessor(i+1);
}
}
else if(xml_node->getName()=="edge")
{
// Adds a single edge to the graph: