change to unit update function to include pathNodes, not worked on attacking