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

◆ Update()

void Update ( float pDelta)
private

Main loop that runs calculations for various Environment parts (wetness, heatcomfort, watercontact, etc.)

check if player is under roof (only if the Building check is false)

Updates data

Process temperatures

heat comfort calculation

Process item wetness/dryness

setting of wetness/dryiness of player

reset item wetness counter;

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

209 {
210 if (m_Player && m_Initialized)
211 {
212 m_RoofCheckTimer += pDelta;
215 {
216 if ( !IsInsideBuilding() )
218
220 }
221
222 m_Time += pDelta;
224 {
225 m_Time = 0;
226 m_WetDryTick++; // Sets whether it is time to add wetness to items and clothing
227
232
235
241
245 else
247
250 {
251 if (IsWaterContact())
252 {
254 }
255 else if ((IsRaining() || (IsSnowing() && MiscGameplayFunctions.GetCombinedSnowfallWindValue() > SNOWFALL_WIND_COMBINED_THRESHOLD)) && !IsInsideBuilding() && !IsUnderRoof() && !IsChildOfType({Car}))
256 {
258 }
259 else
260 {
262 }
263
265 if ((m_ItemsWetnessMax < GameConstants.STATE_WET) && (m_Player.GetStatWet().Get() == 1))
266 {
267 m_Player.GetStatWet().Set(0);
268 }
269 else if ((m_ItemsWetnessMax >= GameConstants.STATE_WET) && (m_Player.GetStatWet().Get() == 0))
270 {
271 m_Player.GetStatWet().Set(1);
272 }
273
274 m_WetDryTick = 0;
276 }
277 }
278 }
279 }
void CollectAndSetEnvironmentData()
Sets actual weather related values for further use (rain, snow, wind, etc.)
Определения Environment.c:641
bool IsChildOfType(array< typename > typenames)
Returns true if character is child of given parent type(s)
Определения Environment.c:330
bool IsWaterContact()
Is character in contact with water body? (periodically checked - GameConstants.ENVIRO_TICK_RATE).
Определения Environment.c:321
ref array< int > m_SlotIdsComplete
Определения Environment.c:76
bool IsInsideBuilding()
Is character inside building? (periodically checked - GameConstants.ENVIRO_TICK_ROOF_RC_CHECK).
Определения Environment.c:313
float m_Time
Определения Environment.c:59
void ProcessTemperatureSources()
Processes registered UTSources and calculates resulting m_UTSAverageTemperature.
Определения Environment.c:1504
void CheckUnderRoof()
Checks whether character is sheltered and sets the information.
Определения Environment.c:391
ref array< int > m_HeadParts
Определения Environment.c:81
void ProcessItemsWetness(array< int > pSlotIds)
Soak items at specific Slot ID(s)
Определения Environment.c:694
void ProcessItemsInHandsTemperature()
Process temperature of item in character hands and cool/warm it to neutral temparature.
Определения Environment.c:1247
bool IsUnderRoof()
Is character under roof (periodically checked - GameConstants.ENVIRO_TICK_ROOF_RC_CHECK)....
Определения Environment.c:305
void ProcessWetnessByWaterLevel(float pWaterLevel)
Processes items wetness in player possession based on the current water level (the character is in)
Определения Environment.c:676
const float SNOWFALL_WIND_COMBINED_THRESHOLD
Определения Environment.c:31
void CollectAndSetPlayerData()
Sets character related value for furher use.
Определения Environment.c:623
ref array< int > m_BodyParts
Определения Environment.c:82
void GatherTemperatureSources()
Checks characters proximity for usable Universal Temperature Sources and register them.
Определения Environment.c:1469
ref array< int > m_FeetParts
Определения Environment.c:83
float m_WetDryTick
Определения Environment.c:38
bool DetermineHeatcomfortBehavior()
Changes Heat Comfort curve behavior based on where the character is.
Определения Environment.c:369
bool IsRaining()
Rain phenomenon actual value > RAIN_LIMIT_LOW.
Определения Environment.c:351
void SetHeatcomfortDirectly()
Определения Environment.c:1086
float m_WaterLevel
Определения Environment.c:67
float m_ItemsWetnessMax
Определения Environment.c:39
bool IsSnowing()
Snowfall phenomenon actual value > SNOWFALL_LIMIT_LOW.
Определения Environment.c:359
float m_RoofCheckTimer
keeps wetness of most wet item in player's possesion
Определения Environment.c:40
void ProcessItemsDryness()
Dry items in player possession.
Определения Environment.c:822
void ProcessHeatComfort()
Calculates and process player's heatcomfort related to defined body parts.
Определения Environment.c:970
void ProcessItemsTemperature(array< int > pBodyPartIds)
Iterate through items in player posession (by given body parts) and cool/warm them to neutral tempara...
Определения Environment.c:1216
void CheckWaterContact(out float pWaterLevel)
Checks player's contanct with water.
Определения Environment.c:421
DayZPlayer m_Player
Определения Hand_Events.c:42
bool m_Initialized
Определения UiHintPanel.c:317
Определения CarScript.c:162
const float ENVIRO_TICKS_TO_WETNESS_CALCULATION
in secs. how often should enviro effet process
Определения 3_Game/constants.c:721
const float ENVIRO_TICK_ROOF_RC_CHECK
each X (ticks) is processed wetness on items on player
Определения 3_Game/constants.c:722
const float ENVIRO_TICK_RATE
Определения 3_Game/constants.c:720
const float STATE_WET
Определения 3_Game/constants.c:874

Перекрестные ссылки CheckUnderRoof(), CheckWaterContact(), CollectAndSetEnvironmentData(), CollectAndSetPlayerData(), DetermineHeatcomfortBehavior(), GameConstants::ENVIRO_TICK_RATE, GameConstants::ENVIRO_TICK_ROOF_RC_CHECK, GameConstants::ENVIRO_TICKS_TO_WETNESS_CALCULATION, GatherTemperatureSources(), IsChildOfType(), IsInsideBuilding(), IsRaining(), IsSnowing(), IsUnderRoof(), IsWaterContact(), m_BodyParts, m_FeetParts, m_HeadParts, m_Initialized, m_ItemsWetnessMax, m_Player, m_RoofCheckTimer, m_SlotIdsComplete, m_Time, m_WaterLevel, m_WetDryTick, ProcessHeatComfort(), ProcessItemsDryness(), ProcessItemsInHandsTemperature(), ProcessItemsTemperature(), ProcessItemsWetness(), ProcessTemperatureSources(), ProcessWetnessByWaterLevel(), SetHeatcomfortDirectly(), SNOWFALL_WIND_COMBINED_THRESHOLD и GameConstants::STATE_WET.