Using geodata checks with fear when pathfinding is enabled.
This commit is contained in:
@@ -973,16 +973,15 @@ public class L2CharacterAI extends AbstractAI
|
|||||||
_actor.setRunning();
|
_actor.setRunning();
|
||||||
}
|
}
|
||||||
|
|
||||||
// If pathfinding enabled the creature will go to the defined destination (retail like).
|
// If pathfinding enabled the creature will go to the nearest obstacle.
|
||||||
// Otherwise it will go to the nearest obstacle.
|
|
||||||
final Location destination;
|
final Location destination;
|
||||||
if (Config.PATHFINDING > 0)
|
if (Config.PATHFINDING > 0)
|
||||||
{
|
{
|
||||||
destination = new Location(posX, posY, posZ, _actor.getInstanceId());
|
destination = GeoData.getInstance().moveCheck(_actor.getX(), _actor.getY(), _actor.getZ(), posX, posY, posZ, _actor.getInstanceId());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
destination = GeoData.getInstance().moveCheck(_actor.getX(), _actor.getY(), _actor.getZ(), posX, posY, posZ, _actor.getInstanceId());
|
destination = new Location(posX, posY, posZ);
|
||||||
}
|
}
|
||||||
setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, destination);
|
setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, destination);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user