3970 {
3971 array<int> childrenAtt = new array<int>;
3972 array<int> attachmentsArray = new array<int>;
3973 if (attachments)
3974 attachmentsArray.Copy(attachments);
3975 else
3976 {
3978 {
3979 attachmentsArray.Insert(
GetInventory().GetAttachmentSlotId(i));
3980 }
3981 }
3982
3984
3985 foreach( int slot : attachmentsArray )
3986 {
3987 if( parent )
3988 item = parent.GetInventory().FindAttachment(slot);
3989 else
3990 item = this;
3991
3992 if( item )
3993 {
3994 if( item.GetInventory().AttachmentCount() > 0 )
3995 {
3996 for(i = 0; i < item.GetInventory().GetAttachmentSlotsCount(); i++)
3997 {
3998 childrenAtt.Insert(item.GetInventory().GetAttachmentSlotId(i));
3999 }
4000
4002 }
4003
4004 item.SetInvisible(invisible);
4005 item.OnInvisibleSet(invisible);
4006 }
4007 }
4008 }
proto native GameInventory GetInventory()
void EntityAI()
cache blood infection chance (cfgVehicles-><entity>->Skinning->BloodInfectionSettings)
void SetInvisibleRecursive(bool invisible, EntityAI parent=null, array< int > attachments=null)
proto native int GetAttachmentSlotsCount()