1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 14:57:44 +00:00

Changed navigation to use meshes named by bg path instead of teriinfo name#

This commit is contained in:
mordred 2019-01-25 08:31:20 +01:00
parent b994989ed6
commit 176ae00c08

View file

@ -165,7 +165,13 @@ bool Sapphire::World::Manager::TerritoryMgr::createDefaultTerritories()
uint32_t guid = getNextInstanceId(); uint32_t guid = getNextInstanceId();
auto pNaviMgr = framework()->get< Manager::NaviMgr >(); auto pNaviMgr = framework()->get< Manager::NaviMgr >();
bool hasNaviMesh = pNaviMgr->setupTerritory( territoryInfo->name ); std::string bgPath = territoryInfo->bg;
std::string bg;
auto findPos = bgPath.find_last_of( "/" );
if( findPos != std::string::npos )
bg = bgPath.substr( findPos + 1 );
bool hasNaviMesh = pNaviMgr->setupTerritory( bg );
Logger::info( "{0}\t{1}\t{2}\t{3:<10}\t{4}\t{5}\t{6}", Logger::info( "{0}\t{1}\t{2}\t{3:<10}\t{4}\t{5}\t{6}",
territoryTypeId, territoryTypeId,