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

Method DestroyAttachment

Code/CryEngine/CryEntitySystem/ScriptBind_Entity.cpp:2066–2084  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2064
2065//////////////////////////////////////////////////////////////////////////
2066int CScriptBind_Entity::DestroyAttachment(IFunctionHandler* pH, int characterSlot, const char* attachmentName)
2067{
2068 if (GetISystem()->IsSerializingFile())
2069 return pH->EndFunction();
2070
2071 GET_ENTITY;
2072
2073 ICharacterInstance* pCharacter = pEntity->GetCharacter(characterSlot);
2074
2075 if (!pCharacter)
2076 {
2077 return pH->EndFunction();
2078 }
2079
2080 IAttachmentManager* pIAttachmentManager = pCharacter->GetIAttachmentManager();
2081 pIAttachmentManager->RemoveAttachmentByName(attachmentName);
2082
2083 return pH->EndFunction();
2084}
2085
2086//////////////////////////////////////////////////////////////////////////
2087int CScriptBind_Entity::GetAttachmentBone(IFunctionHandler* pH, int characterSlot, const char* attachmentName)

Callers

nothing calls this directly

Calls 5

GetISystemFunction · 0.85
IsSerializingFileMethod · 0.80
EndFunctionMethod · 0.45
GetCharacterMethod · 0.45

Tested by

no test coverage detected