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

◆ UpdateCorpseStateVisual()

void ManBase::UpdateCorpseStateVisual ( )
inlineprotected

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

9226 {
9227 //Print("---Prettying up corpses... | " + g_Game.GetTime() + " | " + this + " | " + GetType() + "---");
9228 //Print("m_DecayedTexture = " + m_DecayedTexture);
9229 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
9230 if (state == PlayerConstants.CORPSE_STATE_DECAYED)
9231 {
9232 EntityAI bodypart;
9233 ItemBase item;
9234
9235 string path;
9236 int idx;
9237 int slot_id;
9238 array<string> bodyparts = {"Gloves","Body","Legs","Feet"};
9239
9240 GameInventory inventory = GetInventory();
9241 int nBodyparts = bodyparts.Count();
9242 for (int i = 0; i < nBodyparts; ++i)
9243 {
9244 slot_id = InventorySlots.GetSlotIdFromString(bodyparts.Get(i));
9245 bodypart = inventory.FindPlaceholderForSlot(slot_id);
9246 item = ItemBase.Cast(inventory.FindAttachment(slot_id));
9247
9248 if (bodypart)
9249 {
9250 path = "cfgVehicles " + bodypart.GetType();
9251 idx = bodypart.GetHiddenSelectionIndex("personality");
9252 if (idx > -1)
9253 {
9254 bodypart.SetObjectTexture(idx,m_DecayedTexture);
9255 }
9256 }
9257 if (item)
9258 {
9259 path = "cfgVehicles " + item.GetType();
9260 idx = item.GetHiddenSelectionIndex("personality");
9261 if (idx > -1)
9262 {
9263 item.SetObjectTexture(idx,m_DecayedTexture);
9264 }
9265 }
9266 }
9267
9268 SetFaceTexture(m_DecayedTexture);
9269 }
9270 }
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:190
int m_CorpseState
Определения PlayerBase.c:148

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

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