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

Method OnMoveToSlot

ogsr_engine/xrGame/CustomOutfit.cpp:122–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120#include "torch.h"
121
122void CCustomOutfit::OnMoveToSlot()
123{
124 inherited::OnMoveToSlot();
125 if (m_pCurrentInventory)
126 {
127 CActor* pActor = smart_cast<CActor*>(m_pCurrentInventory->GetOwner());
128 if (pActor)
129 {
130 if (m_ActorVisual.size())
131 {
132 pActor->ChangeVisual(m_ActorVisual);
133 }
134 if (pSettings->line_exist(cNameSect(), "bones_koeff_protection"))
135 {
136 m_boneProtection->reload(pSettings->r_string(cNameSect(), "bones_koeff_protection"), smart_cast<IKinematics*>(pActor->Visual()));
137 }
138
139 if (pSettings->line_exist(cNameSect(), "player_hud_section"))
140 g_player_hud->load(pSettings->r_string(cNameSect(), "player_hud_section"));
141 else
142 g_player_hud->load_default();
143
144 smart_cast<CUIGameSP*>(HUD().GetUI()->UIGame())->InventoryMenu->UpdateOutfit();
145 }
146 }
147}
148
149void CCustomOutfit::OnDropOrMoveToRuck()
150{

Callers 1

SlotMethod · 0.45

Calls 12

ChangeVisualMethod · 0.80
line_existMethod · 0.80
VisualMethod · 0.80
load_defaultMethod · 0.80
UpdateOutfitMethod · 0.80
UIGameMethod · 0.80
GetUIMethod · 0.80
GetOwnerMethod · 0.45
sizeMethod · 0.45
reloadMethod · 0.45
r_stringMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected