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
+5 -9
View File
@@ -1520,7 +1520,6 @@ void Mob::AI_Process() {
}
else {
bool waypoint_changed, node_reached;
auto &Goal = owner->GetPosition();
CalculateNewPosition(Goal.x, Goal.y, Goal.z, pet_speed, true);
@@ -1792,16 +1791,13 @@ void NPC::AI_DoMovement() {
}
else if (IsGuarding()) {
bool CP2Moved;
CalculateNewPosition(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, move_speed);
//if(Distance(m_GuardPoint, m_Position))
if (!((m_Position.x == m_GuardPoint.x) && (m_Position.y == m_GuardPoint.y) && (m_Position.z == m_GuardPoint.z))) {
CP2Moved = CalculateNewPosition(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, move_speed);
}
else {
CP2Moved = false;
}
bool at_gp = CalculateDistance(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z) < 0.1f;
if (!CP2Moved) {
if (at_gp) {
if (moved) {
Log(Logs::Detail,
Logs::AI,