MCPcopy Create free account
hub / github.com/MergHQ/CRYENGINE / HideAttachment

Method HideAttachment

Code/CryEngine/CryEntitySystem/ScriptBind_Entity.cpp:2411–2437  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

2409}
2410//////////////////////////////////////////////////////////////////////////
2411int CScriptBind_Entity::HideAttachment(IFunctionHandler* pH, int characterSlot, const char* attachmentName, bool hide, bool hideShadow)
2412{
2413 GET_ENTITY;
2414
2415 ICharacterInstance* pCharacter = pEntity->GetCharacter(characterSlot);
2416
2417 if (!pCharacter)
2418 {
2419 return pH->EndFunction();
2420 }
2421
2422 IAttachmentManager* pIAttachmentManager = pCharacter->GetIAttachmentManager();
2423
2424 if (pIAttachmentManager)
2425 {
2426 IAttachment* pAttachment = pIAttachmentManager->GetInterfaceByName(attachmentName);
2427
2428 if (pAttachment)
2429 {
2430 pAttachment->HideAttachment(hide);
2431 pAttachment->HideInRecursion(hideShadow);
2432 pAttachment->HideInShadow(hideShadow);
2433 }
2434 }
2435
2436 return pH->EndFunction();
2437}
2438
2439//////////////////////////////////////////////////////////////////////////
2440int CScriptBind_Entity::HideAllAttachments(IFunctionHandler* pH, int characterSlot, bool hide, bool hideShadow)

Callers 5

SetAttachmentEffectMethod · 0.45
SetAttachmentObjectMethod · 0.45
SetAttachmentCGFMethod · 0.45
SetAttachmentLightMethod · 0.45
HideAllAttachmentsMethod · 0.45

Calls 5

GetInterfaceByNameMethod · 0.80
GetCharacterMethod · 0.45
EndFunctionMethod · 0.45
HideInRecursionMethod · 0.45
HideInShadowMethod · 0.45

Tested by

no test coverage detected