forked from MagicBane/Server
simplified mob aI
This commit is contained in:
@@ -116,6 +116,9 @@ public class StandardMob {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!mob.BehaviourType.isAgressive)
|
||||||
|
return;
|
||||||
|
|
||||||
if(mob.BehaviourType.equals(Enum.MobBehaviourType.HamletGuard)){
|
if(mob.BehaviourType.equals(Enum.MobBehaviourType.HamletGuard)){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -180,6 +183,9 @@ public class StandardMob {
|
|||||||
|
|
||||||
public static void CheckForMovement(Mob mob){
|
public static void CheckForMovement(Mob mob){
|
||||||
|
|
||||||
|
if(!mob.BehaviourType.canRoam)
|
||||||
|
return;
|
||||||
|
|
||||||
if(mob.combatTarget != null){
|
if(mob.combatTarget != null){
|
||||||
//chase player
|
//chase player
|
||||||
if(!CombatUtilities.inRange2D(mob,mob.combatTarget,mob.getRange())) {
|
if(!CombatUtilities.inRange2D(mob,mob.combatTarget,mob.getRange())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user