Sources/CryGame C++/Solution1/CryGame/XArea.cpp
// do leave area - player was inside, now is outside
// calls entity OnLeaveArea wich calls script OnLeaveArea( player, AreaID )	
//////////////////////////////////////////////////////////////////////////

do leave area - player was inside, now is outside
calls entity OnLeaveArea wich calls script OnLeaveArea( player, AreaID )
do leave area - player was inside now is outside calls entity OnLeaveArea wich calls script OnLeaveArea ( player AreaID )
void	CXArea::LeaveArea( CXAreaUser& user )
{
	IEntity* pEntity;
	if (user.m_pGame->m_bIsLoadingLevelFromFile)
		return;
	UpdateIDs( user.m_pGame->GetSystem() );
	for( unsigned int eIdx=0; eIdx<m_vEntityID.size(); eIdx++ )
	{
		pEntity = user.m_pGame->GetSystem()->GetIEntitySystem()->GetEntity(m_vEntityID[eIdx]);
		if (pEntity)
		{
			pEntity->OnLeaveArea( user.m_pEntity, m_AreaID);
			if(user.m_pGame->a_LogArea->GetIVal())
				user.m_pGame->m_pLog->Log("\001 CXArea::LeaveArea calling  %s\n", pEntity->GetName() );
		}
	}
	m_PrevFade = -1;
	m_bIsActive = false;
}
void CXArea :: LeaveArea ( CXAreaUser & user ) { IEntity * pEntity ; if ( user . m_pGame -> m_bIsLoadingLevelFromFile ) return ; UpdateIDs ( user . m_pGame -> GetSystem ( ) ) ; for ( unsigned int eIdx = 0 ; eIdx < m_vEntityID . size ( ) ; eIdx ++ ) { pEntity = user . m_pGame -> GetSystem ( ) -> GetIEntitySystem ( ) -> GetEntity ( m_vEntityID [ eIdx ] ) ; if ( pEntity ) { pEntity -> OnLeaveArea ( user . m_pEntity , m_AreaID ) ; if ( user . m_pGame -> a_LogArea -> GetIVal ( ) ) user . m_pGame -> m_pLog -> Log ( " \001 \n " , pEntity -> GetName ( ) ) ; } } m_PrevFade = -1 ; m_bIsActive = false ; }
do leave area - player was inside, now is outside
calls entity OnLeaveArea wich calls script OnLeaveArea( player, AreaID )
do leave area - player was inside now is outside calls entity OnLeaveArea wich calls script OnLeaveArea ( player AreaID )