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:
parent
a9d9ca4234
commit
31324e54e6
@ -142,6 +142,17 @@ void QuadGraph::load(const std::string &filename)
|
|||||||
m_all_nodes[i]->addSuccessor(i!=to ? i+1 : from);
|
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")
|
else if(xml_node->getName()=="edge")
|
||||||
{
|
{
|
||||||
// Adds a single edge to the graph:
|
// Adds a single edge to the graph:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user