Bug fixes with fear points and teleport jumps

This commit is contained in:
KimLS
2017-08-06 20:48:39 -07:00
parent 3afee1f841
commit 575ba28b62
4 changed files with 67 additions and 25 deletions
+7
View File
@@ -187,6 +187,13 @@ IPathfinder::IPath PathfinderWaypoint::FindRoute(const glm::vec3 &start, const g
glm::vec3 PathfinderWaypoint::GetRandomLocation()
{
if (m_impl->Nodes.size() > 0) {
auto idx = zone->random.Int(0, (int)m_impl->Nodes.size() - 1);
auto &node = m_impl->Nodes[idx];
return node.v;
}
return glm::vec3();
}