Fix unknown sector in arena after rescue
This commit is contained in:
parent
c22714951c
commit
3c24c73faa
@ -55,11 +55,11 @@ void TrackSector::update(const Vec3 &xyz, bool ignore_vertical)
|
||||
|
||||
const ArenaGraph* ag = ArenaGraph::get();
|
||||
std::vector<int>* test_nodes = NULL;
|
||||
if (ag)
|
||||
if (ag && m_on_road && prev_sector != Graph::UNKNOWN_SECTOR)
|
||||
{
|
||||
// For ArenaGraph, only test nodes around current node
|
||||
if (prev_sector != Graph::UNKNOWN_SECTOR)
|
||||
test_nodes = ag->getNode(prev_sector)->getNearbyNodes();
|
||||
// For ArenaGraph, only test nodes around current node if previously
|
||||
// is on road
|
||||
test_nodes = ag->getNode(prev_sector)->getNearbyNodes();
|
||||
}
|
||||
|
||||
Graph::get()->findRoadSector(xyz, &m_current_graph_node, test_nodes,
|
||||
|
Loading…
Reference in New Issue
Block a user