diff --git a/src/world/Actor/BNpc.cpp b/src/world/Actor/BNpc.cpp index 78990c0f..70250b62 100644 --- a/src/world/Actor/BNpc.cpp +++ b/src/world/Actor/BNpc.cpp @@ -211,7 +211,7 @@ bool Sapphire::Entity::BNpc::moveTo( const FFXIVARR_POSITION3& pos ) auto pNaviMgr = m_pFw->get< World::Manager::NaviMgr >(); auto pNaviProvider = pNaviMgr->getNaviProvider( m_pCurrentZone->getInternalName() ); - if(!pNaviProvider) + if( !pNaviProvider ) { Logger::error( "No NaviProvider for zone#{0} - {1}", m_pCurrentZone->getGuId(), m_pCurrentZone->getInternalName() ); return false; diff --git a/src/world/Manager/DebugCommandMgr.cpp b/src/world/Manager/DebugCommandMgr.cpp index 70bec2eb..e79e3d2c 100644 --- a/src/world/Manager/DebugCommandMgr.cpp +++ b/src/world/Manager/DebugCommandMgr.cpp @@ -372,12 +372,12 @@ void Sapphire::World::Manager::DebugCommandMgr::set( char* data, Entity::Player& auto inRange = player.getInRangeActors(); for( auto actor : inRange ) + { + if( actor->getId() == player.getTargetId() && actor->getAsChara()->isAlive() ) { - if( actor->getId() == player.getTargetId() && actor->getAsChara()->isAlive() ) - { - actor->getAsBNpc()->onActionHostile( player.getAsChara() ); - } + actor->getAsBNpc()->onActionHostile( player.getAsChara() ); } + } } else { diff --git a/src/world/Navi/NaviProvider.h b/src/world/Navi/NaviProvider.h index 3108a47a..3f54c502 100644 --- a/src/world/Navi/NaviProvider.h +++ b/src/world/Navi/NaviProvider.h @@ -55,15 +55,10 @@ namespace Sapphire float m_polyFindRange[3]; private: - static int fixupCorridor( dtPolyRef* path, const int npath, const int maxPath, - const dtPolyRef* visited, const int nvisited ); + static int fixupCorridor( dtPolyRef* path, const int npath, const int maxPath, const dtPolyRef* visited, const int nvisited ); static int fixupShortcuts( dtPolyRef* path, int npath, dtNavMeshQuery* navQuery ); inline static bool inRange( const float* v1, const float* v2, const float r, const float h ); - static bool getSteerTarget( dtNavMeshQuery* navQuery, const float* startPos, const float* endPos, - const float minTargetDist, - const dtPolyRef* path, const int pathSize, - float* steerPos, unsigned char& steerPosFlag, dtPolyRef& steerPosRef, - float* outPoints = 0, int* outPointCount = 0 ); + static bool getSteerTarget( dtNavMeshQuery* navQuery, const float* startPos, const float* endPos, const float minTargetDist, const dtPolyRef* path, const int pathSize, float* steerPos, unsigned char& steerPosFlag, dtPolyRef& steerPosRef, float* outPoints = 0, int* outPointCount = 0 ); };