Fix, cleanup and simplify the roambox logic and cleanup a bunch of other related code

This commit is contained in:
Akkadius
2018-08-18 18:12:18 -05:00
parent 7cc5b143fc
commit 4b6ab34fd9
9 changed files with 479 additions and 396 deletions
+9 -3
View File
@@ -1481,8 +1481,14 @@ void Merc::AI_Process() {
if (RuleB(Mercs, MercsUsePathing) && zone->pathing) {
bool WaypointChanged, NodeReached;
glm::vec3 Goal = UpdatePath(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(),
GetRunspeed(), WaypointChanged, NodeReached);
glm::vec3 Goal = UpdatePath(
GetTarget()->GetX(),
GetTarget()->GetY(),
GetTarget()->GetZ(),
GetRunspeed(),
WaypointChanged,
NodeReached
);
if (WaypointChanged)
tar_ndx = 20;
@@ -1588,7 +1594,7 @@ void Merc::AI_Process() {
}
}
if(IsMoving())
if (IsMoving())
SendPositionUpdate();
else
SendPosition();