mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
18 lines
481 B
C++
18 lines
481 B
C++
#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 navmesh_path = fmt::format("maps/nav/{0}.nav", zone);
|
|
if (stat(navmesh_path.c_str(), &statbuffer) == 0) {
|
|
return new PathfinderNavmesh(navmesh_path);
|
|
}
|
|
|
|
return new PathfinderNull();
|
|
}
|