DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ SetInvisibleRecursive()

void Entity::SetInvisibleRecursive ( bool invisible,
EntityAI parent = null,
array< int > attachments = null )
inlineprotected

См. определение в файле EntityAI.c строка 3964

3965 {
3966 array<int> childrenAtt = new array<int>;
3967 array<int> attachmentsArray = new array<int>;
3968 if (attachments)
3969 attachmentsArray.Copy(attachments);
3970 else
3971 {
3972 for (int i = 0; i < GetInventory().GetAttachmentSlotsCount(); i++)
3973 {
3974 attachmentsArray.Insert(GetInventory().GetAttachmentSlotId(i));
3975 }
3976 }
3977
3978 EntityAI item;
3979
3980 foreach( int slot : attachmentsArray )
3981 {
3982 if( parent )
3983 item = parent.GetInventory().FindAttachment(slot);
3984 else
3985 item = this;//GetInventory().FindAttachment(slot);
3986
3987 if( item )
3988 {
3989 if( item.GetInventory().AttachmentCount() > 0 )
3990 {
3991 for(i = 0; i < item.GetInventory().GetAttachmentSlotsCount(); i++)
3992 {
3993 childrenAtt.Insert(item.GetInventory().GetAttachmentSlotId(i));
3994 }
3995
3996 SetInvisibleRecursive(invisible,item,childrenAtt);
3997 }
3998
3999 item.SetInvisible(invisible);
4000 item.OnInvisibleSet(invisible);
4001 }
4002 }
4003 }
proto native GameInventory GetInventory()
void EntityAI()
cache blood infection chance (cfgVehicles-><entity>->Skinning->BloodInfectionSettings)
Определения EntityAI.c:202
void SetInvisibleRecursive(bool invisible, EntityAI parent=null, array< int > attachments=null)
Определения EntityAI.c:3964
proto native int GetAttachmentSlotsCount()

Перекрестные ссылки EntityAI(), GetInventory() и SetInvisibleRecursive().

Используется в OnWasDetached() и SetInvisibleRecursive().