| 89 | } |
| 90 | |
| 91 | void 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 | |
| 112 | void CUIArtefactDetectorSimple::setup_internals() |
| 113 | { |
no test coverage detected