mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-04 17:57:47 +00:00
gracefully crash the server if no navmeshes exist with a useful error
This commit is contained in:
parent
fc47f8346e
commit
44ae1cb641
2 changed files with 8 additions and 1 deletions
|
@ -66,8 +66,9 @@ bool Sapphire::World::Manager::TerritoryMgr::init()
|
|||
createDefaultTerritories();
|
||||
createHousingTerritories();
|
||||
}
|
||||
catch( std::runtime_error& )
|
||||
catch( const std::runtime_error& ex )
|
||||
{
|
||||
Logger::fatal( "Caught exception during territory init: {}", ex.what() );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -136,6 +136,12 @@ bool Sapphire::Zone::init()
|
|||
|
||||
m_pNaviProvider = pNaviMgr->getNaviProvider( m_territoryTypeInfo->bg );
|
||||
|
||||
if( !m_pNaviProvider )
|
||||
{
|
||||
Logger::fatal( "No navmesh found for TerritoryType#{}", getTerritoryTypeId() );
|
||||
throw std::runtime_error( "Missing navmesh file(s)." );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue