/////////////////////////////////////////////////////////////////////
| 2085 | |
| 2086 | ////////////////////////////////////////////////////////////////////////// |
| 2087 | int 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 | ////////////////////////////////////////////////////////////////////////// |
| 2112 | int CScriptBind_Entity::GetAttachmentCGF(IFunctionHandler* pH, int characterSlot, const char* attachmentName) |
nothing calls this directly
no test coverage detected