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

◆ UpdateCorpseStateVisual()

void ManBase::UpdateCorpseStateVisual ( )
inlineprotected

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

8884 {
8885 //Print("---Prettying up corpses... | " + GetGame().GetTime() + " | " + this + " | " + GetType() + "---");
8886 //Print("m_DecayedTexture = " + m_DecayedTexture);
8887 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
8888 if (state == PlayerConstants.CORPSE_STATE_DECAYED)
8889 {
8890 EntityAI bodypart;
8891 ItemBase item;
8892
8893 string path;
8894 int idx;
8895 int slot_id;
8896 array<string> bodyparts = {"Gloves","Body","Legs","Feet"};
8897
8898 for (int i = 0; i < bodyparts.Count(); i++)
8899 {
8900 slot_id = InventorySlots.GetSlotIdFromString(bodyparts.Get(i));
8901 bodypart = GetInventory().FindPlaceholderForSlot(slot_id);
8902 item = ItemBase.Cast(GetInventory().FindAttachment(slot_id));
8903
8904 if (bodypart)
8905 {
8906 path = "cfgVehicles " + bodypart.GetType();
8907 idx = bodypart.GetHiddenSelectionIndex("personality");
8908 if (idx > -1)
8909 {
8910 bodypart.SetObjectTexture(idx,m_DecayedTexture);
8911 }
8912 }
8913 if (item)
8914 {
8915 path = "cfgVehicles " + item.GetType();
8916 idx = item.GetHiddenSelectionIndex("personality");
8917 if (idx > -1)
8918 {
8919 item.SetObjectTexture(idx,m_DecayedTexture);
8920 }
8921 }
8922 }
8923
8924 SetFaceTexture(m_DecayedTexture);
8925 }
8926 }
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().