mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +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;
|
bool AtPrevNode = DistanceSquared(From, PathingLastPosition) < 1.0f;
|
||||||
if (AtPrevNode) {
|
if (AtPrevNode) {
|
||||||
PathingLoopCount++;
|
PathingLoopCount++;
|
||||||
|
auto front = (*Route.begin()).pos;
|
||||||
|
|
||||||
if (PathingLoopCount > 5) {
|
if (PathingLoopCount > 5) {
|
||||||
|
Teleport(front);
|
||||||
SendPosition();
|
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;
|
return front;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user