Fixed monsters getting stuck to obstacles.
This commit is contained in:
parent
30bb3a55b5
commit
a60d504ad1
@ -940,10 +940,12 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
if (!npc.isInsideRadius(newX, newY, 0, collision, false, false))
|
||||
{
|
||||
final int newZ = npc.getZ() + 30;
|
||||
if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), newX, newY, newZ, npc.getInstanceId()))
|
||||
{
|
||||
moveTo(newX, newY, newZ);
|
||||
}
|
||||
|
||||
// fixes monsters not avoiding obstacles
|
||||
// if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), newX, newY, newZ, npc.getInstanceId()))
|
||||
// {
|
||||
moveTo(newX, newY, newZ);
|
||||
// }
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user