/////////////////////////////////////////////////////////////////////
| 2409 | } |
| 2410 | ////////////////////////////////////////////////////////////////////////// |
| 2411 | int CScriptBind_Entity::HideAttachment(IFunctionHandler* pH, int characterSlot, const char* attachmentName, bool hide, bool hideShadow) |
| 2412 | { |
| 2413 | GET_ENTITY; |
| 2414 | |
| 2415 | ICharacterInstance* pCharacter = pEntity->GetCharacter(characterSlot); |
| 2416 | |
| 2417 | if (!pCharacter) |
| 2418 | { |
| 2419 | return pH->EndFunction(); |
| 2420 | } |
| 2421 | |
| 2422 | IAttachmentManager* pIAttachmentManager = pCharacter->GetIAttachmentManager(); |
| 2423 | |
| 2424 | if (pIAttachmentManager) |
| 2425 | { |
| 2426 | IAttachment* pAttachment = pIAttachmentManager->GetInterfaceByName(attachmentName); |
| 2427 | |
| 2428 | if (pAttachment) |
| 2429 | { |
| 2430 | pAttachment->HideAttachment(hide); |
| 2431 | pAttachment->HideInRecursion(hideShadow); |
| 2432 | pAttachment->HideInShadow(hideShadow); |
| 2433 | } |
| 2434 | } |
| 2435 | |
| 2436 | return pH->EndFunction(); |
| 2437 | } |
| 2438 | |
| 2439 | ////////////////////////////////////////////////////////////////////////// |
| 2440 | int CScriptBind_Entity::HideAllAttachments(IFunctionHandler* pH, int characterSlot, bool hide, bool hideShadow) |
no test coverage detected