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

Method Flash

ogsr_engine/xrGame/SimpleDetector.cpp:91–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91void CUIArtefactDetectorSimple::Flash(bool bOn, float fRelPower)
92{
93 if (!m_parent->HudItemData())
94 return;
95
96 IKinematics* K = m_parent->HudItemData()->m_model;
97 R_ASSERT(K);
98 if (bOn)
99 {
100 K->LL_SetBoneVisible(m_flash_bone, TRUE, TRUE);
101 m_turn_off_flash_time = Device.dwTimeGlobal + iFloor(fRelPower * 500.0f);
102 }
103 else
104 {
105 K->LL_SetBoneVisible(m_flash_bone, FALSE, TRUE);
106 m_turn_off_flash_time = 0;
107 }
108 if (bOn != m_flash_light->get_active())
109 m_flash_light->set_active(bOn);
110}
111
112void CUIArtefactDetectorSimple::setup_internals()
113{

Callers 1

UpdateAfMethod · 0.80

Calls 4

HudItemDataMethod · 0.80
LL_SetBoneVisibleMethod · 0.80
get_activeMethod · 0.80
set_activeMethod · 0.45

Tested by

no test coverage detected