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

◆ ProcessUniversalTemperatureSources()

void PluginBase::ProcessUniversalTemperatureSources ( )
inlineprotected

next temp source is too far (not cleaned on server, like in Environment, client need to know about all sources in MAXRANGE)

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

90 {
91 if (m_UTemperatureSourceDebugs.Count() == 0)
92 {
94
95 return;
96 }
97
98 array<float> utsTemperatures = new array<float>();
99
100 // get temperature from the source (based on distance), save it for min/max filtering
102 {
104 if (vector.DistanceSq(m_Player.GetPosition(), utsd.GetValue(0).ToVector()) > Math.SqrFloat(utsd.GetValue(2).ToFloat()))
105 continue;
106
107 utsTemperatures.Insert(CalcTemperatureFromTemperatureSource(utsd));
108 }
109
110 float min = MiscGameplayFunctions.GetMinValue(utsTemperatures);
111 float max = MiscGameplayFunctions.GetMaxValue(utsTemperatures);
112
113 if (max > 0 && min < 0)
114 {
115 m_UTSAverageTemperature = (max + min) * 0.5;
116 }
117 else
118 {
120 }
121
122 }
void UniversalTemperatureSourceDebug()
keeps first iteration of parsed data from the m_Data
Определения UniversalTemperatureSource.c:262
ref array< ref UTemperatureSourceDebug > m_UTemperatureSourceDebugs
float CalcTemperatureFromTemperatureSource(notnull UTemperatureSourceDebug utsd)
PlayerBase m_Player
Определения PluginAdminLog.c:12
float m_UTSAverageTemperature

Перекрестные ссылки CalcTemperatureFromTemperatureSource(), vector::DistanceSq(), m_Player, m_UTemperatureSourceDebugs, m_UTSAverageTemperature и Math::SqrFloat().

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