Fix for bug in pathing stuck detection

This commit is contained in:
KimLS 2017-08-29 22:03:22 -07:00
parent 46561b9cf5
commit 0ba9b3fedc

View File

@ -77,18 +77,17 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa
bool AtPrevNode = DistanceSquared(From, PathingLastPosition) < 1.0f;
if (AtPrevNode) {
PathingLoopCount++;
auto front = (*Route.begin()).pos;
if (PathingLoopCount > 5) {
SendPosition();
}
auto front = (*Route.begin()).pos;
Teleport(front);
SendPosition();
Route.pop_front();
WaypointChanged = true;
NodeReached = true;
PathingLoopCount = 0;
}
return front;
}