Some changes to navmesh path finding, disabled waypoint nav interface for now, might keep it disabled (i don't think anyones using it anyway) added a rule that might need some fine tuning for navmesh pathfinding

This commit is contained in:
KimLS
2018-12-24 14:48:11 -08:00
parent d3aa74ff54
commit e96539e6a8
10 changed files with 307 additions and 27 deletions
-5
View File
@@ -8,15 +8,10 @@
IPathfinder *IPathfinder::Load(const std::string &zone) {
struct stat statbuffer;
std::string waypoint_path = fmt::format("maps/path/{0}.path", zone);
std::string navmesh_path = fmt::format("maps/nav/{0}.nav", zone);
if (stat(navmesh_path.c_str(), &statbuffer) == 0) {
return new PathfinderNavmesh(navmesh_path);
}
if (stat(waypoint_path.c_str(), &statbuffer) == 0) {
return new PathfinderWaypoint(waypoint_path);
}
return new PathfinderNull();
}