mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 04:16:46 +00:00
Movement will now be handled by the movement manager instead of mob
This commit is contained in:
+5
-9
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user