Sources/CryGame C++/Solution1/CryGame/XArea.cpp
//////////////////////////////////////////////////////////////////////
// init attached entities IDs list using entites names list

init attached entities IDs list using entites names list
init attached entities IDs list using entites names list
void	CXArea::UpdateIDs( ISystem * pSystem )
{
	IEntity* pEntity;
	for( unsigned int eIdx=0; eIdx<m_vEntityID.size(); eIdx++ )
	{		
		pEntity = pSystem->GetIEntitySystem()->GetEntity(m_vEntityID[eIdx]);
		if(!pEntity)
		{
			pEntity = pSystem->GetIEntitySystem()->GetEntity((char *)m_vsEntityName[eIdx].c_str());
			if(!pEntity)
			{
				m_vEntityID[eIdx] = 0;
				continue;
			}
			m_vEntityID[eIdx] = pEntity->GetId();
		}
	}
}
void CXArea :: UpdateIDs ( ISystem * pSystem ) { IEntity * pEntity ; for ( unsigned int eIdx = 0 ; eIdx < m_vEntityID . size ( ) ; eIdx ++ ) { pEntity = pSystem -> GetIEntitySystem ( ) -> GetEntity ( m_vEntityID [ eIdx ] ) ; if ( ! pEntity ) { pEntity = pSystem -> GetIEntitySystem ( ) -> GetEntity ( ( char * ) m_vsEntityName [ eIdx ] . c_str ( ) ) ; if ( ! pEntity ) { m_vEntityID [ eIdx ] = 0 ; continue ; } m_vEntityID [ eIdx ] = pEntity -> GetId ( ) ; } } }
init attached entities IDs list using entites names list
init attached entities IDs list using entites names list