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

Method UpdateRelation

ogsr_engine/xrGame/ui/UICharacterInfo.cpp:279–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277}
278
279void CUICharacterInfo::UpdateRelation()
280{
281 if (!m_icons[eUIRelation] || !m_icons[eUIRelationCaption])
282 return;
283
284 if (Actor()->ID() == m_ownerID || !hasOwner())
285 {
286 if (m_icons[eUIRelationCaption])
287 m_icons[eUIRelationCaption]->Show(false);
288 if (m_icons[eUIRelation])
289 m_icons[eUIRelation]->Show(false);
290 }
291 else
292 {
293 if (m_icons[eUIRelationCaption])
294 m_icons[eUIRelationCaption]->Show(true);
295 if (m_icons[eUIRelation])
296 m_icons[eUIRelation]->Show(true);
297
298 CSE_ALifeTraderAbstract* T = ch_info_get_from_id(m_ownerID);
299 CSE_ALifeTraderAbstract* TA = ch_info_get_from_id(Actor()->ID());
300
301 SetRelation(RELATION_REGISTRY().GetRelationType(T, TA), RELATION_REGISTRY().GetAttitude(T, TA));
302 }
303}
304
305namespace detail
306{ // helper function implemented in file alife_simulator.cpp

Callers

nothing calls this directly

Calls 6

ActorFunction · 0.85
ch_info_get_from_idFunction · 0.85
RELATION_REGISTRYClass · 0.85
ShowMethod · 0.45
GetRelationTypeMethod · 0.45
GetAttitudeMethod · 0.45

Tested by

no test coverage detected