mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 12:54:00 +00:00
c9b8ba7b46
When tile is not found in memory cache try to find it in the database.
24 lines
673 B
C++
24 lines
673 B
C++
#include "navigator.hpp"
|
|
#include "navigatorimpl.hpp"
|
|
#include "navigatorstub.hpp"
|
|
#include "recastglobalallocator.hpp"
|
|
|
|
namespace DetourNavigator
|
|
{
|
|
std::unique_ptr<Navigator> makeNavigator(const Settings& settings, const std::string& userDataPath)
|
|
{
|
|
DetourNavigator::RecastGlobalAllocator::init();
|
|
|
|
std::unique_ptr<NavMeshDb> db;
|
|
if (settings.mEnableNavMeshDiskCache)
|
|
db = std::make_unique<NavMeshDb>(userDataPath + "/navmesh.db");
|
|
|
|
return std::make_unique<NavigatorImpl>(settings, std::move(db));
|
|
}
|
|
|
|
std::unique_ptr<Navigator> makeNavigatorStub()
|
|
{
|
|
return std::make_unique<NavigatorStub>();
|
|
}
|
|
}
|