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

◆ HideHairSelections()

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

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

9314 {
9315 if (!item || !item.GetHeadHidingSelection() || !m_CharactersHead)
9316 return;
9317
9318 int slot_id; //item currently attached (or detaching from) here
9319 string slot_name; //item currently attached (or detaching from) here
9320 string str
9321 int idx = 0;
9322 int i;
9323 int count;
9324 GameInventory itemInventory = item.GetInventory();
9325 itemInventory.GetCurrentAttachmentSlotInfo(slot_id,slot_name);
9326
9327 if (item.HidesSelectionBySlot())
9328 {
9329 count = itemInventory.GetSlotIdCount();
9330 for (i = 0; i < count; ++i)
9331 {
9332 if (itemInventory.GetSlotId(i) == slot_id)
9333 {
9334 str = item.GetHeadHidingSelection().Get(i);
9335 idx = m_CharactersHead.m_HeadHairSelectionArray.Find(str);
9336 if (idx != -1)
9337 SetHairLevelToHide(idx,state);
9338 #ifdef DEVELOPER
9339 else
9340 Debug.Log("No valid selection '" + str + "' found on head of " + GetType() + ". Verify the p3d, model config, and the 'HAIR_HIDING_SELECTIONS' macro in basicDefines.");
9341 #endif
9342 }
9343 }
9344 }
9345 else
9346 {
9347 count = item.GetHeadHidingSelection().Count();
9348 for (i = 0; i < count; i++)
9349 {
9350 str = item.GetHeadHidingSelection().Get(i);
9351 idx = m_CharactersHead.m_HeadHairSelectionArray.Find(str);
9352 if (idx != -1)
9353 SetHairLevelToHide(idx,state);
9354 #ifdef DEVELOPER
9355 else
9356 Debug.Log("No valid selection '" + str + "' found on head of " + GetType() + ". Verify the p3d, model config, and the 'HAIR_HIDING_SELECTIONS' macro in basicDefines.");
9357 #endif
9358 }
9359 }
9361 }
eBleedingSourceType GetType()
string Debug()
Определения CachedEquipmentStorageBase.c:26
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:9363
void SetHairLevelToHide(int level, bool state, bool was_debug=false)
Dynamic hair hiding.
Определения PlayerBase.c:9261
Head_Default m_CharactersHead
Определения PlayerBase.c:184

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

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