mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 14:41:28 +00:00
Fix for bug in pathing stuck detection
This commit is contained in:
parent
46561b9cf5
commit
0ba9b3fedc
@ -77,19 +77,18 @@ 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) {
|
||||
Teleport(front);
|
||||
SendPosition();
|
||||
Route.pop_front();
|
||||
|
||||
WaypointChanged = true;
|
||||
NodeReached = true;
|
||||
PathingLoopCount = 0;
|
||||
}
|
||||
|
||||
auto front = (*Route.begin()).pos;
|
||||
Teleport(front);
|
||||
Route.pop_front();
|
||||
|
||||
WaypointChanged = true;
|
||||
NodeReached = true;
|
||||
PathingLoopCount = 0;
|
||||
|
||||
return front;
|
||||
}
|
||||
else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user