fixed pathfinding including during battle.