| 95 | |
| 96 | void CUIArtefactDetectorAdv::SetValue(const float val1, const Fvector& val2) { m_target_dir = val2; } |
| 97 | void CUIArtefactDetectorAdv::update() |
| 98 | { |
| 99 | if (!m_parent->HudItemData() || m_bid == u16(-1)) |
| 100 | return; |
| 101 | inherited::update(); |
| 102 | attachable_hud_item* itm = m_parent->HudItemData(); |
| 103 | R_ASSERT(itm); |
| 104 | |
| 105 | BOOL b_visible = !fis_zero(m_target_dir.magnitude()); |
| 106 | if (b_visible != itm->m_model->LL_GetBoneVisible(m_bid)) |
| 107 | itm->m_model->LL_SetBoneVisible(m_bid, b_visible, TRUE); |
| 108 | |
| 109 | if (!b_visible) |
| 110 | return; |
| 111 | |
| 112 | Fvector dest; |
| 113 | Fmatrix Mi; |
| 114 | Mi.invert(itm->m_item_transform); |
| 115 | Mi.transform_dir(dest, m_target_dir); |
| 116 | |
| 117 | float dest_y_rot = -dest.getH(); |
| 118 | |
| 119 | m_cur_y_rot = angle_inertion_var(m_cur_y_rot, dest_y_rot, PI_DIV_4, PI_MUL_4, PI_MUL_2, Device.fTimeDelta); |
| 120 | } |
| 121 | void CAdvancedDetector::on_a_hud_attach() |
| 122 | { |
| 123 | inherited::on_a_hud_attach(); |
nothing calls this directly
no test coverage detected