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

◆ UpdateVicinityTemperatureRecursive()

void UniversalTemperatureSourceLambdaBaseImpl::UpdateVicinityTemperatureRecursive ( EntityAI ent,
TemperatureData dta,
float heatPermeabilityCoef = 1.0 )
inlineprotected

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

92 {
93 float heatPermCoef = heatPermeabilityCoef;
94 heatPermCoef *= ent.GetHeatPermeabilityCoef();
95 dta.m_HeatPermeabilityCoef = heatPermCoef;
96
97 //handle temperature of this entity
98 if (ent.CanHaveTemperature() && !ent.IsSelfAdjustingTemperature())
99 {
100 float temperatureDifference = dta.m_AdjustedTarget - ent.GetTemperature();
101 if (Math.AbsFloat(temperatureDifference) >= GameConstants.TEMPERATURE_SENSITIVITY_THRESHOLD || !ent.IsFreezeThawProgressFinished()) //ignoring insignificant increments
102 ent.SetTemperatureEx(dta);
103 else
104 ent.RefreshTemperatureAccess(dta);
105 }
106
107 // go through any attachments and cargo, recursive
108 int inventoryAttCount = ent.GetInventory().AttachmentCount();
109 if (inventoryAttCount > 0)
110 {
111 EntityAI attachmentEnt;
112 for (int inAttIdx = 0; inAttIdx < inventoryAttCount; ++inAttIdx)
113 {
114 if (Class.CastTo(attachmentEnt,ent.GetInventory().GetAttachmentFromIndex(inAttIdx)))
115 {
116 UpdateVicinityTemperatureRecursive(attachmentEnt,dta,heatPermCoef);
117 }
118 }
119 }
120
121 if (ent.GetInventory().GetCargo())
122 {
123 int inventoryItemCount = ent.GetInventory().GetCargo().GetItemCount();
124 if (inventoryItemCount > 0)
125 {
126 EntityAI cargoEnt;
127 for (int j = 0; j < inventoryItemCount; ++j)
128 {
129 if (Class.CastTo(cargoEnt,ent.GetInventory().GetCargo().GetItem(j)))
130 {
131 UpdateVicinityTemperatureRecursive(cargoEnt,dta,heatPermCoef);
132 }
133 }
134 }
135 }
136 }
class LogManager EntityAI
float m_AdjustedTarget
Определения TemperatureData.c:6
float m_HeatPermeabilityCoef
Определения TemperatureData.c:9
void UpdateVicinityTemperatureRecursive(EntityAI ent, TemperatureData dta, float heatPermeabilityCoef=1.0)

Перекрестные ссылки Math::AbsFloat(), Class::CastTo(), TemperatureData::m_AdjustedTarget, TemperatureData::m_HeatPermeabilityCoef, GameConstants::TEMPERATURE_SENSITIVITY_THRESHOLD и UpdateVicinityTemperatureRecursive().

Используется в UpdateVicinityTemperatureRecursive() и WarmAndCoolItemsInVicinity().