mob AI work
This commit is contained in:
@@ -85,7 +85,7 @@ public class MobAI {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//mob.updateLocation();
|
mob.updateLocation();
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: AttackTarget" + " " + e.getMessage());
|
Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: AttackTarget" + " " + e.getMessage());
|
||||||
@@ -305,7 +305,7 @@ public class MobAI {
|
|||||||
if (minion.getKey().despawned == false) {
|
if (minion.getKey().despawned == false) {
|
||||||
if (MovementUtilities.canMove(minion.getKey())) {
|
if (MovementUtilities.canMove(minion.getKey())) {
|
||||||
Vector3f minionOffset = Formation.getOffset(2, minion.getValue() + 3);
|
Vector3f minionOffset = Formation.getOffset(2, minion.getValue() + 3);
|
||||||
//minion.getKey().updateLocation();
|
minion.getKey().updateLocation();
|
||||||
Vector3fImmutable formationPatrolPoint = new Vector3fImmutable(mob.destination.x + minionOffset.x, mob.destination.y, mob.destination.z + minionOffset.z);
|
Vector3fImmutable formationPatrolPoint = new Vector3fImmutable(mob.destination.x + minionOffset.x, mob.destination.y, mob.destination.z + minionOffset.z);
|
||||||
MovementUtilities.aiMove(minion.getKey(), formationPatrolPoint, true);
|
MovementUtilities.aiMove(minion.getKey(), formationPatrolPoint, true);
|
||||||
}
|
}
|
||||||
@@ -810,7 +810,7 @@ public class MobAI {
|
|||||||
if (!MovementUtilities.canMove(mob))
|
if (!MovementUtilities.canMove(mob))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//mob.updateLocation();
|
mob.updateLocation();
|
||||||
|
|
||||||
switch (mob.behaviourType) {
|
switch (mob.behaviourType) {
|
||||||
|
|
||||||
@@ -1029,7 +1029,7 @@ public class MobAI {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
mob.updateMovementState();
|
mob.updateMovementState();
|
||||||
//mob.updateLocation();
|
mob.updateLocation();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: chaseTarget" + " " + e.getMessage());
|
Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: chaseTarget" + " " + e.getMessage());
|
||||||
}
|
}
|
||||||
@@ -1384,7 +1384,7 @@ public class MobAI {
|
|||||||
if (minion.getKey().despawned == false) {
|
if (minion.getKey().despawned == false) {
|
||||||
if (MovementUtilities.canMove(minion.getKey())) {
|
if (MovementUtilities.canMove(minion.getKey())) {
|
||||||
Vector3f minionOffset = Formation.getOffset(2, minion.getValue() + 3);
|
Vector3f minionOffset = Formation.getOffset(2, minion.getValue() + 3);
|
||||||
//minion.getKey().updateLocation();
|
minion.getKey().updateLocation();
|
||||||
Vector3fImmutable formationPatrolPoint = new Vector3fImmutable(mob.destination.x + minionOffset.x, mob.destination.y, mob.destination.z + minionOffset.z);
|
Vector3fImmutable formationPatrolPoint = new Vector3fImmutable(mob.destination.x + minionOffset.x, mob.destination.y, mob.destination.z + minionOffset.z);
|
||||||
MovementUtilities.aiMove(minion.getKey(), formationPatrolPoint, true);
|
MovementUtilities.aiMove(minion.getKey(), formationPatrolPoint, true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1017,7 +1017,7 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
//Next upda
|
//Next upda
|
||||||
}
|
}
|
||||||
|
|
||||||
setLoc(newLoc);
|
this.setLoc(newLoc);
|
||||||
this.region = AbstractWorldObject.GetRegionByWorldObject(this);
|
this.region = AbstractWorldObject.GetRegionByWorldObject(this);
|
||||||
//Next update will be end Loc, lets stop him here.
|
//Next update will be end Loc, lets stop him here.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user