MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / UpdateAf

Method UpdateAf

ogsr_engine/xrGame/EliteDetector.cpp:20–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19CUIArtefactDetectorElite& CEliteDetector::ui() { return *((CUIArtefactDetectorElite*)m_ui); }
20void CEliteDetector::UpdateAf()
21{
22 ui().Clear();
23 if (m_artefacts.m_ItemInfos.empty())
24 return;
25
26 auto it_b = m_artefacts.m_ItemInfos.begin();
27 auto it_e = m_artefacts.m_ItemInfos.end();
28 auto it = it_b;
29
30 Fvector detector_pos = Position();
31 for (; it_b != it_e; ++it_b)
32 {
33 CArtefact* pAf = it_b->first;
34 if (pAf->H_Parent())
35 continue;
36
37 ui().RegisterItemToDraw(pAf->Position(), "af_sign");
38
39 if (pAf->CanBeInvisible())
40 {
41 float d = detector_pos.distance_to(pAf->Position());
42 if (d < m_fAfVisRadius)
43 pAf->SwitchVisibility(true);
44 }
45 }
46}
47
48bool CEliteDetector::render_item_3d_ui_query() { return IsWorking() && ui().m_wrk_area != nullptr; }
49void CEliteDetector::render_item_3d_ui()

Callers

nothing calls this directly

Calls 9

RegisterItemToDrawMethod · 0.80
PositionMethod · 0.80
CanBeInvisibleMethod · 0.80
SwitchVisibilityMethod · 0.80
ClearMethod · 0.45
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
distance_toMethod · 0.45

Tested by

no test coverage detected