1
0
forked from 0ad/0ad

Fixed a bug with projectiles trying to hit non-extant entities.

This was SVN commit r3232.
This commit is contained in:
Matei 2005-12-11 23:28:50 +00:00
parent 2e5d310c56
commit 8cbf23f123
2 changed files with 2 additions and 2 deletions

View File

@ -400,7 +400,7 @@ void CEntity::UpdateAuras( size_t timestep_millis )
// out of range.
for( ; it2 != it_a->m_Influenced.end(); it2++ )
UpdateAuras_LeaveRange( *it_a, it2->GetEntity() );
break;
}
if( it2 == it_a->m_Influenced.end() )

View File

@ -115,7 +115,7 @@ void CEntityManager::GetExtant( std::vector<CEntity*>& results )
{
results.clear();
for( int i = 0; i < MAX_HANDLES; i++ )
if( m_entities[i].m_refcount && !m_entities[i].m_entity->m_destroyed )
if( m_entities[i].m_refcount && !m_entities[i].m_entity->m_destroyed && m_entities[i].m_entity->m_extant )
results.push_back( m_entities[i].m_entity );
}