Removed existing movement code, started replacing

This commit is contained in:
KimLS
2018-09-15 19:20:47 -07:00
parent 953bee6c21
commit c677169edd
11 changed files with 186 additions and 369 deletions
+19 -19
View File
@@ -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;