Movement will now be handled by the movement manager instead of mob

This commit is contained in:
KimLS
2018-09-20 16:14:47 -07:00
parent f754cb1307
commit 7278c6294d
32 changed files with 323 additions and 306 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ void AdjustRoute(std::list<IPathfinder::IPathNode> &nodes, int flymode, float of
}
for (auto &node : nodes) {
if (flymode == 0 || !zone->watermap->InLiquid(node.pos)) {
if (flymode == GravityBehavior::Ground || !zone->watermap->InLiquid(node.pos)) {
auto best_z = zone->zonemap->FindBestZ(node.pos, nullptr);
if (best_z != BEST_Z_INVALID) {
node.pos.z = best_z + offset;
@@ -114,7 +114,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa
}
bool AtNextNode = false;
if (flymode == 1) {
if (flymode == GravityBehavior::Flying) {
AtNextNode = DistanceSquared(From, (*Route.begin()).pos) < 4.0f;
}
else {