本文整理汇总了C++中CActor::ChangeVisual方法的典型用法代码示例。如果您正苦于以下问题:C++ CActor::ChangeVisual方法的具体用法?C++ CActor::ChangeVisual怎么用?C++ CActor::ChangeVisual使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CActor
的用法示例。
在下文中一共展示了CActor::ChangeVisual方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
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);
};
}
}
}
};
示例2: Game
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()) );
};
}
}
};