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
+1 -14
View File
@@ -133,20 +133,7 @@ void Mob::CalculateNewFearpoint()
if (Node.x != 0.0f || Node.y != 0.0f || Node.z != 0.0f) {
++Node.z;
glm::vec3 CurrentPosition(GetX(), GetY(), GetZ());
auto Route = zone->pathing->FindRoute(CurrentPosition, Node);
if (!Route.empty())
{
auto first = (*Route.begin());
m_FearWalkTarget = glm::vec3(first.pos.x, first.pos.y, first.pos.z);
currently_fleeing = true;
Log(Logs::Detail, Logs::None, "Feared to node %i (%8.3f, %8.3f, %8.3f)", Node, first.pos.x, first.pos.y, first.pos.z);
return;
}
m_FearWalkTarget = Node;
}