mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 22:17:45 +00:00
warn instead of crash with missing navmeshes
This commit is contained in:
parent
49e710acdb
commit
3f6d7934a5
3 changed files with 5 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
|
|
||||||
#define SPDLOG_LEVEL_NAMES { "trace", "debug", "info", "warning", "error", "fatal", "off" }
|
#define SPDLOG_LEVEL_NAMES { "trace", "debug", "info", "warn", "error", "fatal", "off" }
|
||||||
|
|
||||||
#include <spdlog/spdlog.h>
|
#include <spdlog/spdlog.h>
|
||||||
#include <spdlog/async.h>
|
#include <spdlog/async.h>
|
||||||
|
|
|
@ -401,6 +401,9 @@ void Sapphire::Entity::BNpc::update( uint64_t tickCount )
|
||||||
|
|
||||||
auto pNaviProvider = m_pCurrentZone->getNaviProvider();
|
auto pNaviProvider = m_pCurrentZone->getNaviProvider();
|
||||||
|
|
||||||
|
if( !pNaviProvider )
|
||||||
|
return;
|
||||||
|
|
||||||
switch( m_state )
|
switch( m_state )
|
||||||
{
|
{
|
||||||
case BNpcState::Dead:
|
case BNpcState::Dead:
|
||||||
|
|
|
@ -138,8 +138,7 @@ bool Sapphire::Zone::init()
|
||||||
|
|
||||||
if( !m_pNaviProvider )
|
if( !m_pNaviProvider )
|
||||||
{
|
{
|
||||||
Logger::fatal( "No navmesh found for TerritoryType#{}", getTerritoryTypeId() );
|
Logger::warn( "No navmesh found for TerritoryType#{}", getTerritoryTypeId() );
|
||||||
throw std::runtime_error( "Missing navmesh file(s)." );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue