pathfinding: implement autoscanner, improve NPC pathfinding