void CCustomOutfit::OnMoveToRuck () { if (m_pInventory) { CActor* pActor = smart_cast<CActor*> (m_pInventory->GetOwner()); if (pActor) { CTorch* pTorch = smart_cast<CTorch*>(pActor->inventory().ItemFromSlot(TORCH_SLOT)); if(pTorch) { pTorch->SwitchNightVision(false); } if (m_ActorVisual.size()) { shared_str DefVisual = pActor->GetDefaultVisualOutfit(); if (DefVisual.size()) { pActor->ChangeVisual(DefVisual); }; } } } };
void CCustomOutfit::OnMoveToSlot () { if (m_pInventory) { CActor* pActor = smart_cast<CActor*> (m_pInventory->GetOwner()); if (pActor) { if (m_ActorVisual.size()) { shared_str NewVisual = NULL; char* TeamSection = Game().getTeamSection(pActor->g_Team()); if (TeamSection) { if (pSettings->line_exist(TeamSection, *cNameSect())) { NewVisual = pSettings->r_string(TeamSection, *cNameSect()); string256 SkinName; std::strcpy(SkinName, pSettings->r_string("mp_skins_path", "skin_path")); strcat(SkinName, *NewVisual); strcat(SkinName, ".ogf"); NewVisual._set(SkinName); } } if (!NewVisual.size()) NewVisual = m_ActorVisual; pActor->ChangeVisual(NewVisual); } if(pSettings->line_exist(cNameSect(),"bones_koeff_protection")){ m_boneProtection->reload( pSettings->r_string(cNameSect(),"bones_koeff_protection"), smart_cast<CKinematics*>(pActor->Visual()) ); }; } } };