/////////////////////////////////////////////////////////////////////
| 2137 | |
| 2138 | ////////////////////////////////////////////////////////////////////////// |
| 2139 | int CScriptBind_Entity::ResetAttachment(IFunctionHandler* pH, int characterSlot, const char* attachmentName) |
| 2140 | { |
| 2141 | GET_ENTITY; |
| 2142 | |
| 2143 | ICharacterInstance* pCharacter = pEntity->GetCharacter(characterSlot); |
| 2144 | |
| 2145 | if (!pCharacter) |
| 2146 | { |
| 2147 | return pH->EndFunction(); |
| 2148 | } |
| 2149 | |
| 2150 | IAttachmentManager* pIAttachmentManager = pCharacter->GetIAttachmentManager(); |
| 2151 | IAttachment* pIAttachment = pIAttachmentManager->GetInterfaceByName(attachmentName); |
| 2152 | |
| 2153 | if (pIAttachment) |
| 2154 | { |
| 2155 | pIAttachment->ClearBinding(); |
| 2156 | } |
| 2157 | |
| 2158 | return pH->EndFunction(); |
| 2159 | } |
| 2160 | |
| 2161 | int CScriptBind_Entity::SetAttachmentEffect(IFunctionHandler* pH, int characterSlot, const char* attachmentName, const char* effectName, Vec3 offset, Vec3 dir, float scale, int flags) |
| 2162 | { |
nothing calls this directly
no test coverage detected