mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 22:57:45 +00:00
Small bnpc fixed. Target / initial state
This commit is contained in:
parent
3a4b472ddd
commit
a387f649fa
3 changed files with 9 additions and 10 deletions
|
@ -92,11 +92,10 @@ TiledNavmeshGenerator::~TiledNavmeshGenerator()
|
|||
|
||||
if( m_triareas )
|
||||
delete[] m_triareas;
|
||||
if( m_solid )
|
||||
delete m_solid;
|
||||
delete m_ctx;
|
||||
|
||||
rcFreeContourSet( m_cset );
|
||||
rcFreeHeightField( m_solid );
|
||||
rcFreeCompactHeightfield(m_chf);
|
||||
rcFreePolyMesh( m_pmesh );
|
||||
rcFreePolyMeshDetail( m_dmesh );
|
||||
|
|
|
@ -67,12 +67,14 @@ Sapphire::Entity::BNpc::BNpc( uint32_t id, BNpcTemplatePtr pTemplate, float posX
|
|||
m_rot = rot;
|
||||
m_level = level;
|
||||
m_invincibilityType = InvincibilityNone;
|
||||
m_currentStance = Common::Stance::Passive;
|
||||
|
||||
m_pCurrentZone = pZone;
|
||||
|
||||
m_spawnPos = m_pos;
|
||||
|
||||
m_timeOfDeath = 0;
|
||||
m_targetId = Common::INVALID_GAME_OBJECT_ID64;
|
||||
|
||||
m_maxHp = maxHp;
|
||||
m_maxMp = 200;
|
||||
|
|
|
@ -400,11 +400,12 @@ void Sapphire::Zone::updateBNpcs( int64_t tickCount )
|
|||
if( !pBNpc )
|
||||
continue;
|
||||
|
||||
if( !pBNpc->isAlive() && currTime - pBNpc->getTimeOfDeath() > 10 )
|
||||
{
|
||||
removeActor( pBNpc );
|
||||
break;
|
||||
}
|
||||
if( !pBNpc->isAlive() )
|
||||
if( currTime - pBNpc->getTimeOfDeath() > 10 )
|
||||
{
|
||||
removeActor( pBNpc );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for( uint32_t y = 0; y < _sizeY; ++y )
|
||||
|
@ -673,9 +674,6 @@ void Sapphire::Zone::updateInRangeSet( Entity::ActorPtr pActor, Cell* pCell )
|
|||
pActor->addInRangeActor( pCurAct );
|
||||
pCurAct->addInRangeActor( pActor );
|
||||
|
||||
// this is a hack to limit actor spawn in one packetset
|
||||
if( count++ > 10 )
|
||||
break;
|
||||
}
|
||||
else if( !isInRange && isInRangeSet )
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue