Instructions Jenkins Doxygen

(unstable) [fixed] Warping mobs and broken escorts. 35/2035/1
authordannuic <dannuic@swgemu.com>
Fri, 11 Jul 2014 18:10:23 +0000 (12:10 -0600)
committerdannuic <dannuic@swgemu.com>
Fri, 11 Jul 2014 18:10:23 +0000 (12:10 -0600)
Change-Id: Ic583f06fd0dec59544f7cf0d11d3888aadc2f948

MMOCoreORB/src/server/zone/objects/creature/AiAgentImplementation.cpp

index b0de31d..d907068 100644 (file)
@@ -1104,8 +1104,6 @@ bool AiAgentImplementation::findNextPosition(float maxDistance, bool walk) {
                if (path == NULL) {
                        // we weren't able to find a path, so remove this location from patrolPoints and try again with the next one
                        PatrolPoint oldPoint = patrolPoints.remove(0);
-                       /*if (followState == AiAgent::PATROLLING)
-                               patrolPoints.add(oldPoint);*/
 
                        continue;
                }
@@ -1126,7 +1124,6 @@ bool AiAgentImplementation::findNextPosition(float maxDistance, bool walk) {
                        //activateMovementEvent();
                        if (followState == AiAgent::PATROLLING) {
                                PatrolPoint oldPoint = patrolPoints.remove(0);
-                               //patrolPoints.add(oldPoint);
                        }
 
                        if (isRetreating())
@@ -1140,8 +1137,6 @@ bool AiAgentImplementation::findNextPosition(float maxDistance, bool walk) {
 
                        currentSpeed = 0;
 
-                       completeMove();
-
                        if (followObject != NULL && !(isRetreating() || isFleeing()))
                                checkNewAngle();
 
@@ -1183,8 +1178,6 @@ bool AiAgentImplementation::findNextPosition(float maxDistance, bool walk) {
                                        if (i == path->size() - 1) {
                                                // this is the last point in the path to the patrolPoint
                                                PatrolPoint oldPoint = patrolPoints.remove(0);
-                                               /*if (followState == AiAgent::PATROLLING)
-                                                       patrolPoints.add(oldPoint);*/
                                                // make sure the patrolPoint doesn't get removed twice (removing a new target position)
                                                remove = false;
                                        }
@@ -1305,8 +1298,6 @@ bool AiAgentImplementation::findNextPosition(float maxDistance, bool walk) {
                if (!found && remove) {
                        // we were not able to find the next point to head to, and we haven't popped patrolPoints yet
                        PatrolPoint oldPoint = patrolPoints.remove(0);
-                       /*if (followState == AiAgent::PATROLLING)
-                               patrolPoints.add(oldPoint);*/
                }
        }
 
@@ -1354,8 +1345,6 @@ bool AiAgentImplementation::findNextPosition(float maxDistance, bool walk) {
                        notifyObservers(ObserverEventType::DESTINATIONREACHED);
 
                currentSpeed = 0;
-
-               completeMove();
        }
 
        if (!(isRetreating() || isFleeing()))
@@ -1486,6 +1475,7 @@ int AiAgentImplementation::setDestination() {
                        return setDestination();
                }
 
+               clearPatrolPoints();
                setNextPosition(followObject->getPositionX(), followObject->getPositionZ(), followObject->getPositionY(), followObject->getParent().get());
                break;
        default: