|
|
@ -64,7 +64,7 @@ public class MobAi2 { |
|
|
|
switch(getState(mob)){ |
|
|
|
switch(getState(mob)){ |
|
|
|
case Idle: |
|
|
|
case Idle: |
|
|
|
if(mob.isMoving()) |
|
|
|
if(mob.isMoving()) |
|
|
|
mob.stopMovement(mob.getMovementLoc()); |
|
|
|
mob.stopMovement(mob.loc); |
|
|
|
if(mob.combatTarget != null) { |
|
|
|
if(mob.combatTarget != null) { |
|
|
|
mob.setCombatTarget(null); |
|
|
|
mob.setCombatTarget(null); |
|
|
|
mob.setCombat(false); |
|
|
|
mob.setCombat(false); |
|
|
@ -128,7 +128,6 @@ public class MobAi2 { |
|
|
|
if (mob.canSee(target)) |
|
|
|
if (mob.canSee(target)) |
|
|
|
mob.setCombatTarget(target); |
|
|
|
mob.setCombatTarget(target); |
|
|
|
if (mob.combatTarget != null) { |
|
|
|
if (mob.combatTarget != null) { |
|
|
|
mob.stopMovement(mob.getMovementLoc()); |
|
|
|
|
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -166,8 +165,6 @@ public class MobAi2 { |
|
|
|
MovementUtilities.aiMove(mob, target.loc, false); |
|
|
|
MovementUtilities.aiMove(mob, target.loc, false); |
|
|
|
} |
|
|
|
} |
|
|
|
return; |
|
|
|
return; |
|
|
|
}else{ |
|
|
|
|
|
|
|
mob.stopMovement(mob.getMovementLoc()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
switch (target.getObjectType()) { |
|
|
|
switch (target.getObjectType()) { |
|
|
|