DayZ 1.28
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 строка 1216

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

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

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