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

◆ UpdateCorpseStateVisual()

void ManBase::UpdateCorpseStateVisual ( )
inlineprotected

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

8982 {
8983 //Print("---Prettying up corpses... | " + GetGame().GetTime() + " | " + this + " | " + GetType() + "---");
8984 //Print("m_DecayedTexture = " + m_DecayedTexture);
8985 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
8986 if (state == PlayerConstants.CORPSE_STATE_DECAYED)
8987 {
8988 EntityAI bodypart;
8989 ItemBase item;
8990
8991 string path;
8992 int idx;
8993 int slot_id;
8994 array<string> bodyparts = {"Gloves","Body","Legs","Feet"};
8995
8996 for (int i = 0; i < bodyparts.Count(); i++)
8997 {
8998 slot_id = InventorySlots.GetSlotIdFromString(bodyparts.Get(i));
8999 bodypart = GetInventory().FindPlaceholderForSlot(slot_id);
9000 item = ItemBase.Cast(GetInventory().FindAttachment(slot_id));
9001
9002 if (bodypart)
9003 {
9004 path = "cfgVehicles " + bodypart.GetType();
9005 idx = bodypart.GetHiddenSelectionIndex("personality");
9006 if (idx > -1)
9007 {
9008 bodypart.SetObjectTexture(idx,m_DecayedTexture);
9009 }
9010 }
9011 if (item)
9012 {
9013 path = "cfgVehicles " + item.GetType();
9014 idx = item.GetHiddenSelectionIndex("personality");
9015 if (idx > -1)
9016 {
9017 item.SetObjectTexture(idx,m_DecayedTexture);
9018 }
9019 }
9020 }
9021
9022 SetFaceTexture(m_DecayedTexture);
9023 }
9024 }
class LogManager EntityAI
class GP5GasMask extends MaskBase ItemBase
string path
Определения OptionSelectorMultistate.c:142
string m_DecayedTexture
Определения PlayerBase.c:143
int m_CorpseState
Определения PlayerBase.c:101

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

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