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

◆ HideHairSelections()

void ManBase::HideHairSelections ( ItemBase item,
bool state )
inlineprotected

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

8962 {
8963 if (!item || !item.GetHeadHidingSelection() || !m_CharactersHead)
8964 return;
8965
8966 int slot_id; //item currently attached (or detaching from) here
8967 string slot_name; //item currently attached (or detaching from) here
8968 string str
8969 int idx = 0;
8970 int i;
8971 int count;
8972 GameInventory itemInventory = item.GetInventory();
8973 itemInventory.GetCurrentAttachmentSlotInfo(slot_id,slot_name);
8974
8975 if (item.HidesSelectionBySlot())
8976 {
8977 count = itemInventory.GetSlotIdCount();
8978 for (i = 0; i < count; ++i)
8979 {
8980 if (itemInventory.GetSlotId(i) == slot_id)
8981 {
8982 str = item.GetHeadHidingSelection().Get(i);
8983 idx = m_CharactersHead.m_HeadHairSelectionArray.Find(str);
8984 if (idx != -1)
8985 SetHairLevelToHide(idx,state);
8986 #ifdef DEVELOPER
8987 else
8988 Debug.Log("No valid selection '" + str + "' found on head of " + GetType() + ". Verify the p3d, model config, and the 'HAIR_HIDING_SELECTIONS' macro in basicDefines.");
8989 #endif
8990 }
8991 }
8992 }
8993 else
8994 {
8995 count = item.GetHeadHidingSelection().Count();
8996 for (i = 0; i < count; i++)
8997 {
8998 str = item.GetHeadHidingSelection().Get(i);
8999 idx = m_CharactersHead.m_HeadHairSelectionArray.Find(str);
9000 if (idx != -1)
9001 SetHairLevelToHide(idx,state);
9002 #ifdef DEVELOPER
9003 else
9004 Debug.Log("No valid selection '" + str + "' found on head of " + GetType() + ". Verify the p3d, model config, and the 'HAIR_HIDING_SELECTIONS' macro in basicDefines.");
9005 #endif
9006 }
9007 }
9009 }
eBleedingSourceType GetType()
string Debug()
Определения CachedEquipmentStorageBase.c:29
proto native int GetSlotId(int index)
attachments
bool GetCurrentAttachmentSlotInfo(out int slot_id, out string slot_name)
Returns true if the item is currently attached and outputs attachment slot id and name.
proto native int GetSlotIdCount()
void UpdateHairSelectionVisibility(bool was_debug=false)
Определения PlayerBase.c:9011
void SetHairLevelToHide(int level, bool state, bool was_debug=false)
Dynamic hair hiding.
Определения PlayerBase.c:8909
Head_Default m_CharactersHead
Определения PlayerBase.c:185

Перекрестные ссылки GameInventory::GetCurrentAttachmentSlotInfo(), GameInventory::GetSlotId(), GameInventory::GetSlotIdCount(), GetType(), Debug::Log(), m_CharactersHead, SetHairLevelToHide() и UpdateHairSelectionVisibility().

Используется в CheckHairClippingOnCharacterLoad(), EEItemAttached() и EEItemDetached().