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

◆ UpdateCorpseStateVisual()

void ManBase::UpdateCorpseStateVisual ( )
inlineprotected

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

9597 {
9598 //Print("---Prettying up corpses... | " + g_Game.GetTime() + " | " + this + " | " + GetType() + "---");
9599 //Print("m_DecayedTexture = " + m_DecayedTexture);
9600 int state = Math.AbsInt(m_CorpseState);//negative sign denotes a special meaning(state was forced to a live player), but we are only intetested in the positive value here
9601 if (state == PlayerConstants.CORPSE_STATE_DECAYED)
9602 {
9603 EntityAI bodypart;
9604 ItemBase item;
9605
9606 string path;
9607 int idx;
9608 int slot_id;
9609 array<string> bodyparts = {"Gloves","Body","Legs","Feet"};
9610
9611 GameInventory inventory = GetInventory();
9612 int nBodyparts = bodyparts.Count();
9613 for (int i = 0; i < nBodyparts; ++i)
9614 {
9615 slot_id = InventorySlots.GetSlotIdFromString(bodyparts.Get(i));
9616 bodypart = inventory.FindPlaceholderForSlot(slot_id);
9617 item = ItemBase.Cast(inventory.FindAttachment(slot_id));
9618
9619 if (bodypart)
9620 {
9621 path = "cfgVehicles " + bodypart.GetType();
9622 idx = bodypart.GetHiddenSelectionIndex("personality");
9623 if (idx > -1)
9624 {
9625 bodypart.SetObjectTexture(idx,m_DecayedTexture);
9626 }
9627 }
9628 if (item)
9629 {
9630 path = "cfgVehicles " + item.GetType();
9631 idx = item.GetHiddenSelectionIndex("personality");
9632 if (idx > -1)
9633 {
9634 item.SetObjectTexture(idx,m_DecayedTexture);
9635 }
9636 }
9637 }
9638
9639 SetFaceTexture(m_DecayedTexture);
9640 }
9641 }
class LogManager EntityAI
class GP5GasMask extends MaskBase ItemBase
string path
Определения OptionSelectorMultistate.c:142
proto native EntityAI FindPlaceholderForSlot(int slot)
Returns placeholder entity for slot (naked arms, legs etc)
proto native EntityAI FindAttachment(int slot)
Returns attached entity in slot (you can use InventorySlots.GetSlotIdFromString(name) to get slot id)
string m_DecayedTexture
Определения PlayerBase.c:189
int m_CorpseState
Определения PlayerBase.c:147

Перекрестные ссылки Math::AbsInt(), PlayerConstants::CORPSE_STATE_DECAYED, GameInventory::FindAttachment(), GameInventory::FindPlaceholderForSlot(), InventorySlots::GetSlotIdFromString(), m_CorpseState, m_DecayedTexture и path.

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