Sources/CryGame C++/Solution1/CryGame/XArea.cpp
//////////////////////////////////////////////////////////////////////////
//	find hosted area with highest priority withing the group of curIdx area

find hosted area with highest priority withing the group of curIdx area
find hosted area with highest priority withing the group of curIdx area
int	CXAreaMgr::FindHighestHostedArea( intVector& hostedAreas, unsigned int curIdx )
{
	unsigned int aIdx;
	int	maxID=-1;
	int	maxArea=-1;
	int curGroup = m_vpAreas[curIdx]->GetGroup();
	if(curGroup<=0)
	{
		return maxArea;
	}
	for(unsigned int inIdx=0; inIdx<hostedAreas.size(); inIdx++)
	{
		aIdx = hostedAreas[inIdx];
		if( aIdx == curIdx )
			continue;
		if( aIdx>=m_vpAreas.size() )
			continue;
		if(curGroup != m_vpAreas[aIdx]->GetGroup())	
			continue;
		if(maxID<m_vpAreas[aIdx]->GetID())
		{
			maxID = m_vpAreas[aIdx]->GetID();
			maxArea	= aIdx;
		}
	}
	return maxArea;
}
int CXAreaMgr :: FindHighestHostedArea ( intVector & hostedAreas , unsigned int curIdx ) { unsigned int aIdx ; int maxID = -1 ; int maxArea = -1 ; int curGroup = m_vpAreas [ curIdx ] -> GetGroup ( ) ; if ( curGroup <= 0 ) { return maxArea ; } for ( unsigned int inIdx = 0 ; inIdx < hostedAreas . size ( ) ; inIdx ++ ) { aIdx = hostedAreas [ inIdx ] ; if ( aIdx == curIdx ) continue ; if ( aIdx >= m_vpAreas . size ( ) ) continue ; if ( curGroup != m_vpAreas [ aIdx ] -> GetGroup ( ) ) continue ; if ( maxID < m_vpAreas [ aIdx ] -> GetID ( ) ) { maxID = m_vpAreas [ aIdx ] -> GetID ( ) ; maxArea = aIdx ; } } return maxArea ; }
find hosted area with highest priority withing the group of curIdx area
find hosted area with highest priority withing the group of curIdx area
//safecheck for editor
 // different groups
