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

◆ ProcessItemsTemperature()

void ProcessItemsTemperature ( array< int > pBodyPartIds)
protected

Iterate through items in player posession (by given body parts) and cool/warm them to neutral temparature.

Аргументы
pBodyPartIdsList of body parts to iterate through (see InventorySlots)

go through all body parts we've defined for that zone (ex.: head, body, feet)

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

1220 {
1221 EntityAI attachment;
1222 ItemBase item;
1223
1224 int attCount = m_Player.GetInventory().AttachmentCount();
1225 for (int attIdx = 0; attIdx < attCount; ++attIdx)
1226 {
1227 attachment = m_Player.GetInventory().GetAttachmentFromIndex(attIdx);
1228 item = ItemBase.Cast(attachment);
1229 int attachmentSlot = attachment.GetInventory().GetSlotId(0);
1230
1232 for (int i = 0; i < pBodyPartIds.Count(); ++i)
1233 {
1234 if (attachmentSlot == pBodyPartIds[i])
1235 {
1236 float heatPermCoef = item.GetHeatPermeabilityCoef();
1237 //first handle the item itself, if necessary
1238 if (item.CanHaveTemperature() && !item.IsSelfAdjustingTemperature())
1239 SetProcessedItemTemperature(item, heatPermCoef);
1240
1241 ProcessItemHierarchyRecursive(item, heatPermCoef);
1242 }
1243 }
1244 }
1245 }
map m_Player
void SetProcessedItemTemperature(ItemBase item, float heatPermeabilityCoef=1.0)
Определения Environment.c:1315
void ProcessItemHierarchyRecursive(ItemBase item, float heatPermeabilityCoef=1.0)
Определения Environment.c:1264
override bool IsSelfAdjustingTemperature()
Определения PortableGasStove.c:287

Перекрестные ссылки ItemBase::IsSelfAdjustingTemperature(), ProcessItemHierarchyRecursive() и SetProcessedItemTemperature().

Используется в Update().