A* pathfinding, broken movement