Move update path to movement manager so all movement will use paths

This commit is contained in:
KimLS
2018-09-18 23:06:56 -07:00
parent 2224b83ae0
commit f754cb1307
14 changed files with 66 additions and 236 deletions
+1 -15
View File
@@ -2687,14 +2687,7 @@ void Bot::AI_Process() {
Log(Logs::Detail, Logs::AI, "Pursuing %s while engaged.", GetTarget()->GetCleanName());
Goal = GetTarget()->GetPosition();
if (RuleB(Bots, UsePathing) && zone->pathing) {
bool WaypointChanged, NodeReached;
Goal = UpdatePath(Goal.x, Goal.y, Goal.z,
GetBotRunspeed(), WaypointChanged, NodeReached);
}
CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetBotRunspeed());
return;
}
@@ -2813,13 +2806,6 @@ void Bot::AI_Process() {
Goal = follow_mob->GetPosition();
if (RuleB(Bots, UsePathing) && zone->pathing) {
bool WaypointChanged, NodeReached;
Goal = UpdatePath(Goal.x, Goal.y, Goal.z,
speed, WaypointChanged, NodeReached);
}
CalculateNewPosition(Goal.x, Goal.y, Goal.z, speed);
return;
}