fixed bug in pathfinder code
added proper line of sight algorithm