/////////////////////////////////////////////////////////////////////
| 2064 | |
| 2065 | ////////////////////////////////////////////////////////////////////////// |
| 2066 | int 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 | ////////////////////////////////////////////////////////////////////////// |
| 2087 | int CScriptBind_Entity::GetAttachmentBone(IFunctionHandler* pH, int characterSlot, const char* attachmentName) |
nothing calls this directly
no test coverage detected