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

◆ ProcessItemsTemperature()

void Environment::ProcessItemsTemperature ( array< int > pBodyPartIds)
inlineprotected

go through all items in player's possession cool/warm them to neutral temperature

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

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

1071 {
1072 EntityAI attachment;
1073 ItemBase item;
1074
1075 int attCount = m_Player.GetInventory().AttachmentCount();
1076 for (int attIdx = 0; attIdx < attCount; ++attIdx)
1077 {
1078 attachment = m_Player.GetInventory().GetAttachmentFromIndex(attIdx);
1079 item = ItemBase.Cast(attachment);
1080 int attachmentSlot = attachment.GetInventory().GetSlotId(0);
1081
1083 for (int i = 0; i < pBodyPartIds.Count(); ++i)
1084 {
1085 if (attachmentSlot == pBodyPartIds[i])
1086 {
1087 float heatPermCoef = item.GetHeatPermeabilityCoef();
1088 //first handle the item itself, if necessary
1089 if (item.CanHaveTemperature() && !item.IsSelfAdjustingTemperature())
1090 SetProcessedItemTemperature(item,heatPermCoef);
1091
1092 ProcessItemHierarchyRecursive(item,heatPermCoef);
1093 }
1094 }
1095 }
1096 }
class LogManager EntityAI
class GP5GasMask extends MaskBase ItemBase
void SetProcessedItemTemperature(ItemBase item, float heatPermeabilityCoef=1.0)
Определения Environment.c:1163
PlayerBase m_Player
Определения Environment.c:30
void ProcessItemHierarchyRecursive(ItemBase item, float heatPermeabilityCoef=1.0)
Определения Environment.c:1112
override bool IsSelfAdjustingTemperature()
Определения PortableGasStove.c:287

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

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