mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Removed existing movement code, started replacing
This commit is contained in:
+19
-19
@@ -86,27 +86,27 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa
|
||||
}
|
||||
|
||||
if (!IsRooted()) {
|
||||
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;
|
||||
}
|
||||
|
||||
return front;
|
||||
}
|
||||
else {
|
||||
//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;
|
||||
// }
|
||||
//
|
||||
// return front;
|
||||
//}
|
||||
//else {
|
||||
PathingLastPosition = From;
|
||||
PathingLoopCount = 0;
|
||||
}
|
||||
//}
|
||||
}
|
||||
else {
|
||||
PathingLastPosition = From;
|
||||
|
||||
Reference in New Issue
Block a user