예제 #1
0
void CEliteDetector::UpdateAf()
{
	ui().Clear							();
	if(m_artefacts.m_ItemInfos.size()==0)	return;

	CAfList::ItemsMapIt it_b	= m_artefacts.m_ItemInfos.begin();
	CAfList::ItemsMapIt it_e	= m_artefacts.m_ItemInfos.end();
	CAfList::ItemsMapIt it		= it_b;

	Fvector						detector_pos = Position();
	for(;it_b!=it_e;++it_b)
	{
		CArtefact *pAf			= it_b->first;
		if(pAf->H_Parent())		
			continue;

		ui().RegisterItemToDraw			(pAf->Position(),"af_sign");

		if(pAf->CanBeInvisible())
		{
			float d = detector_pos.distance_to(pAf->Position());
			if(d<m_fAfVisRadius)
				pAf->SwitchVisibility(true);
		}
	}
}
예제 #2
0
void CScientificDetector::UpfateWork()
{
	ui().Clear							();

	CAfList::ItemsMapIt ait_b	= m_artefacts.m_ItemInfos.begin();
	CAfList::ItemsMapIt ait_e	= m_artefacts.m_ItemInfos.end();
	CAfList::ItemsMapIt ait		= ait_b;
	Fvector						detector_pos = Position();
	for(;ait_b!=ait_e;++ait_b)
	{
		CArtefact *pAf			= ait_b->first;
		if(pAf->H_Parent())		
			continue;

		ui().RegisterItemToDraw	(pAf->Position(), pAf->cNameSect());

		if(pAf->CanBeInvisible())
		{
			float d = detector_pos.distance_to(pAf->Position());
			if(d<m_fAfVisRadius)
				pAf->SwitchVisibility(true);
		}
	}

	CZoneList::ItemsMapIt zit_b	= m_zones.m_ItemInfos.begin();
	CZoneList::ItemsMapIt zit_e	= m_zones.m_ItemInfos.end();
	CZoneList::ItemsMapIt zit	= zit_b;

	for(;zit_b!=zit_e;++zit_b)
	{
		CCustomZone* pZone			= zit_b->first;
		ui().RegisterItemToDraw		(pZone->Position(),pZone->cNameSect());
	}

	m_ui->update			();
}