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

Method GetAttachmentBone

Code/CryEngine/CryEntitySystem/ScriptBind_Entity.cpp:2087–2109  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2085
2086//////////////////////////////////////////////////////////////////////////
2087int CScriptBind_Entity::GetAttachmentBone(IFunctionHandler* pH, int characterSlot, const char* attachmentName)
2088{
2089 GET_ENTITY;
2090
2091 ICharacterInstance* pCharacter = pEntity->GetCharacter(characterSlot);
2092
2093 if (!pCharacter)
2094 {
2095 return pH->EndFunction();
2096 }
2097
2098 IAttachmentManager* pIAttachmentManager = pCharacter->GetIAttachmentManager();
2099
2100 if (pIAttachmentManager)
2101 {
2102 IAttachment* pAttachment = pIAttachmentManager->GetInterfaceByName(attachmentName);
2103
2104 if (pAttachment)
2105 return pH->EndFunction(pCharacter->GetIDefaultSkeleton().GetJointNameByID(pAttachment->GetJointID()));
2106 }
2107
2108 return pH->EndFunction();
2109}
2110
2111//////////////////////////////////////////////////////////////////////////
2112int CScriptBind_Entity::GetAttachmentCGF(IFunctionHandler* pH, int characterSlot, const char* attachmentName)

Callers

nothing calls this directly

Calls 5

GetInterfaceByNameMethod · 0.80
GetCharacterMethod · 0.45
EndFunctionMethod · 0.45
GetJointNameByIDMethod · 0.45
GetJointIDMethod · 0.45

Tested by

no test coverage detected