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

Method update

ogsr_engine/xrGame/AdvancedDetector.cpp:97–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95
96void CUIArtefactDetectorAdv::SetValue(const float val1, const Fvector& val2) { m_target_dir = val2; }
97void 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}
121void CAdvancedDetector::on_a_hud_attach()
122{
123 inherited::on_a_hud_attach();

Callers

nothing calls this directly

Calls 10

updateFunction · 0.85
fis_zeroFunction · 0.85
angle_inertion_varFunction · 0.85
HudItemDataMethod · 0.80
LL_GetBoneVisibleMethod · 0.80
LL_SetBoneVisibleMethod · 0.80
magnitudeMethod · 0.45
invertMethod · 0.45
transform_dirMethod · 0.45
getHMethod · 0.45

Tested by

no test coverage detected