bool AstarMap::buildPath(std::vector<MapNode*>& path, MapNode* last) { MapNode* node = last; path.clear(); while(node != NULL){ path.push_back(node); node->setPath(true); node = node->getParent(); } return !path.empty(); }