mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-09 22:20:24 +00:00
Working on waypoint code, using boost graph libs
This commit is contained in:
@@ -1,7 +1,22 @@
|
||||
#include "../common/seperator.h"
|
||||
#include "client.h"
|
||||
#include "pathfinder_null.h"
|
||||
#include "pathfinder_nav_mesh.h"
|
||||
#include "pathfinder_waypoint.h"
|
||||
#include <fmt/format.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
IPathfinder *IPathfinder::Load(const std::string &zone) {
|
||||
struct stat statbuffer;
|
||||
std::string waypoint_path = fmt::format("maps/{0}.path", zone);
|
||||
std::string navmesh_path = fmt::format("maps/{0}.nav", zone);
|
||||
if (stat(waypoint_path.c_str(), &statbuffer) == 0) {
|
||||
return new PathfinderWaypoint(waypoint_path);
|
||||
}
|
||||
|
||||
//if (stat(waypoint_path.c_str(), &statbuffer) == 0) {
|
||||
// return new PathfinderNavmesh(navmesh_path);
|
||||
//}
|
||||
|
||||
return new PathfinderNull();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user