Browse Source

Revert "cleanup"

This reverts commit e128f60519.
hull4
FatBoy-DOTC 1 year ago
parent
commit
67af6f8c18
  1. 2
      src/engine/mobileAI/MobAI.java
  2. 9
      src/engine/mobileAI/utilities/MovementUtilities.java
  3. 3
      src/engine/objects/Building.java

2
src/engine/mobileAI/MobAI.java

@ -584,7 +584,7 @@ public class MobAI { @@ -584,7 +584,7 @@ public class MobAI {
if(mob.isPlayerGuard() || mob.isSiege()) {
bypassLoadedPlayerCheck = true;
if(mob.combatTarget != null && mob.combatTarget.getObjectType().equals(Enum.GameObjectType.PlayerCharacter))
if(mob.combatTarget.loc.distanceSquared(mob.loc) > 62500)
if(mob.combatTarget.loc.distanceSquared(mob.loc) > 10000)
mob.setCombatTarget(null);
}

9
src/engine/mobileAI/utilities/MovementUtilities.java

@ -301,8 +301,6 @@ private static final int cellGap = 1; @@ -301,8 +301,6 @@ private static final int cellGap = 1;
}
public static void pathfind(AbstractCharacter character, Vector3fImmutable goal){
try {
if(character.isMoving())
return;
if(character.region == null && Regions.getRegionAtLocation(goal) != null) {//mover not inside a building
Building building = BuildingManager.getBuildingAtLocation(goal);
@ -399,6 +397,10 @@ private static final int cellGap = 1; @@ -399,6 +397,10 @@ private static final int cellGap = 1;
current = cheapCorner;
continue;
}
if (path.contains(point))
continue;
}
if (path.contains(point))
@ -406,8 +408,9 @@ private static final int cellGap = 1; @@ -406,8 +408,9 @@ private static final int cellGap = 1;
Regions region = Regions.getRegionAtLocation(point);
if(region != null) {
path.add(new Vector3fImmutable(region.center)); //only use center points when travelling through regions
path.add(new Vector3fImmutable(region.center.x,region.center.y,region.center.z)); //only use center points when travelling through regions
continue;
}
if (pointIsBlocked(point)) {

3
src/engine/objects/Building.java

@ -9,7 +9,6 @@ @@ -9,7 +9,6 @@
package engine.objects;
import com.sun.prism.Mesh;
import engine.Enum;
import engine.Enum.*;
import engine.InterestManagement.RealmMap;
@ -1537,8 +1536,6 @@ public class Building extends AbstractWorldObject { @@ -1537,8 +1536,6 @@ public class Building extends AbstractWorldObject {
}
public void updateNavMesh(){
//TODO figure out how to subtract the mesh of the building form the navMesh
for(Regions region : this.getBounds().getRegions())
this.parentZone.navMesh.add(region.getArea());
}

Loading…
Cancel
Save