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

См. исходные тексты.

Структуры данных

class  EnvironmentDrynessData
 

Перечисления

enum  EEnvironmentHeatcomfortBehaviorCategory { DEFAULT , CAR_ENGINE_ON }
 Categories that are changing behavior of Heat comfort processing. Подробнее...
 

Функции

void Environment (PlayerBase pPlayer)
 
void Init ()
 Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)
 
void Update (float pDelta)
 Main loop that runs calculations for various Environment parts (wetness, heatcomfort, watercontact, etc.)
 
bool IsTemperatureSet ()
 For safe-guards, waiting for the proper temperature to be set.
 
float GetPlayerHeat ()
 Character's heat (calculated from movement speed multiplied by constant)
 
bool IsUnderRoof ()
 Is character under roof (periodically checked - GameConstants.ENVIRO_TICK_ROOF_RC_CHECK). Runs when player is not inside of building.
 
bool IsInsideBuilding ()
 Is character inside building? (periodically checked - GameConstants.ENVIRO_TICK_ROOF_RC_CHECK).
 
bool IsWaterContact ()
 Is character in contact with water body? (periodically checked - GameConstants.ENVIRO_TICK_RATE).
 
bool IsChildOfType (array< typename > typenames)
 Returns true if character is child of given parent type(s)
 
bool IsUnderRoofBuilding ()
 Is character under building's roof (periodically checked - GameConstants.ENVIRO_TICK_ROOF_RC_CHECK). There might be situations where the surface under is external, but character is inside building.
 
bool IsRaining ()
 Rain phenomenon actual value > RAIN_LIMIT_LOW.
 
bool IsSnowing ()
 Snowfall phenomenon actual value > SNOWFALL_LIMIT_LOW.
 
bool DetermineHeatcomfortBehavior ()
 Changes Heat Comfort curve behavior based on where the character is.
 
void CheckUnderRoof ()
 Checks whether character is sheltered and sets the information.
 
void CheckWaterContact (out float pWaterLevel)
 Checks player's contanct with water.
 
float GetWindModifierPerSurface ()
 Wind intensity (influence) modifier of temperature value.
 
float GetTemperature ()
 
float GetTargetHeatComfort ()
 
float GetEnvironmentTemperature ()
 Calculations of temperarute for different situations.
 
float GetWetDelta ()
 Calculates soaking/drying delta based on character's location and weather.
 
void CollectAndSetPlayerData ()
 Sets character related value for furher use.
 
void CollectAndSetEnvironmentData ()
 Sets actual weather related values for further use (rain, snow, wind, etc.)
 
void SetEnvironmentTemperature ()
 
void SetAreaGenericColdness ()
 Determines whether player is in cold area which restricts use of some actions (digging)
 
void ProcessWetnessByWaterLevel (float pWaterLevel)
 Processes items wetness in player possession based on the current water level (the character is in)
 
void ProcessItemsWetness (array< int > pSlotIds)
 Soak items at specific Slot ID(s)
 
void ApplyWetnessToItem (ItemBase pItem)
 
void ProcessItemsDryness ()
 Dry items in player possession.
 
void ApplyDrynessToItem (ItemBase pItem)
 
void ApplyDrynessToItemEx (ItemBase pItem, EnvironmentDrynessData pDrynessData)
 
void ProcessHeatComfort ()
 Calculates and process player's heatcomfort related to defined body parts.
 
void SetTargetHeatComfort (float value)
 
void SetHeatcomfortDirectly ()
 
void ProcessHeatBuffer (EnvironmentSnapshotData data)
 
float GetApplicableHeatbuffer ()
 
void ProcessItemsTemperature (array< int > pBodyPartIds)
 Iterate through items in player posession (by given body parts) and cool/warm them to neutral temparature.
 
void ProcessItemsInHandsTemperature ()
 Process temperature of item in character hands and cool/warm it to neutral temparature.
 
void ProcessItemHierarchyRecursive (ItemBase item, float heatPermeabilityCoef=1.0)
 
void SetProcessedItemTemperature (ItemBase item, float heatPermeabilityCoef=1.0)
 
float EnvTempToCoef (float pTemp)
 
void BodyPartHeatProperties (int pBodyPartId, float pCoef, out float pHeatComfort, out float pHeat)
 Iterate through given body part and calculates heatcofort and item heat value.
 
float NakedBodyPartHeatComfortPenalty (int pBodyPartSlotId, float pCoef)
 Calculates penalty value for heatcomfort - this simulates uncovered body part reaction.
 
void GatherTemperatureSources ()
 Checks characters proximity for usable Universal Temperature Sources and register them.
 
void ProcessTemperatureSources ()
 Processes registered UTSources and calculates resulting m_UTSAverageTemperature.
 
void SetItemHeatingCoef (float val)
 
void OnTemperatureSourcesEnter ()
 Event fired when characters enters into UTSource proximity.
 
void OnTemperatureSourcesLeft ()
 Event fired when characters leave the UTSource proximity.
 
float GetUniversalSourcesTemperageAverage ()
 
float CalcTemperatureFromTemperatureSource (notnull UTemperatureSource uts)
 
string GetDebugMessage ()
 debug
 
int GetNextRoofCheck ()
 
float GetWaterLevel ()
 
bool IsNeutralTemperature (float temperature, float lowerLimit=GameConstants.ITEM_TEMPERATURE_NEUTRAL_ZONE_LOWER_LIMIT, float upperLimit=GameConstants.ITEM_TEMPERATURE_NEUTRAL_ZONE_UPPER_LIMIT)
 
float NormalizedTemperature (float temperature, float lowerLimit=GameConstants.ENVIRO_LOW_TEMP_LIMIT, float upperLimit=GameConstants.ENVIRO_HIGH_TEMP_LIMIT)
 
void Init (PlayerBase pPlayer)
 used for calculations before the data modification
 
bool OverridenHeatComfort (out float value)
 
void AddToEnvironmentTemperature (float pTemperature)
 
void ProcessItemsHeat ()
 
void ProcessWetnessByRain ()
 
float GetTemperatureHeightCorrection ()
 
void BodyPartHeatProperties (array< int > pBodyPartIds, float pCoef, out float pHeatComfort, out float pHeat)
 returns weighted avg heat comfort for bodypart
 
void SetEnvironmentSnapshotData ()
 
void ProcessHeatBuffer (float heatComfortCloths)
 backward compatibility [<1.27]
 
float WindEffectTemperatureValue (float temperatureInput)
 backward compatibility [<1.28]
 
float GetDayOrNight ()
 
bool IsInsideVehicle ()
 

Переменные

enum EEnvironmentHeatcomfortBehaviorCategory m_ClothingHeatComfort
 
float m_TargetHeatComfort
 player's heatcomfort (buffered, stored in player stats)
 
class EnvironmentDrynessData RAIN_LIMIT_LOW = 0.05
 Simulates influence of environment to character Takes input data from WorldData, Weather system and entities simulating temperature and wetness.
 
const float SNOWFALL_LIMIT_LOW = 0.5
 
const float SNOWFALL_WIND_COMBINED_THRESHOLD = 1.3
 
const float WATER_LEVEL_HIGH = 1.5
 
const float WATER_LEVEL_MID = 1.2
 
const float WATER_LEVEL_LOW = 0.5
 
const float WATER_LEVEL_NONE = 0.15
 
float m_WetDryTick
 
float m_ItemsWetnessMax
 
float m_RoofCheckTimer
 keeps wetness of most wet item in player's possesion
 
PlayerBase m_Player
 
float m_PlayerHeightPos
 
float m_PlayerSpeed
 
float m_PlayerTemperature
 
float m_PlayerHeat
 
float m_HeatComfort
 
float m_Rain = 0
 target value of heatcomfort (non-buffered)
 
float m_Snowfall = 0
 
float m_Wind = 0
 
float m_Fog = 0
 
float m_DayOrNight = 0
 
float m_Clouds = 0
 
float m_EnvironmentTemperature
 
float m_Time = 0
 
string m_SurfaceType
 
int m_LiquidType
 
float m_ItemTemperatureCoef
 
float m_WaterLevel
 
bool m_IsUnderRoof
 
bool m_IsUnderRoofBuilding
 
bool m_IsInWater
 
bool m_IsTempSet
 
float m_HeatBufferTimer
 
float m_HeatBufferCapPrevious
 reused as state toggle
 
ref array< intm_SlotIdsComplete
 
ref array< intm_SlotIdsUpper
 
ref array< intm_SlotIdsBottom
 
ref array< intm_SlotIdsLower
 
ref array< intm_HeadParts
 
ref array< intm_BodyParts
 
ref array< intm_FeetParts
 
WorldData m_WorldData
 
bool m_HasTemperatureSources
 
float m_UTSAverageTemperature
 
ref array< UTemperatureSource > m_UTemperatureSources
 
ref SimpleMovingAverage< floatm_UTSAverageTemperatureBuffer
 
ref SimpleMovingAverage< floatm_AverageHeatComfortBuffer
 
int m_HeatComfortBehaviorCategory
 
bool m_Initialized
 
float m_HeatSourceTemp
 DEPRECATED.
 
ref SimpleMovingAverage< floatm_WindAverageBuffer
 
ref EnvironmentSnapshotData m_EnvironmentSnapshot