PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
Environment.c File Reference

Data Structures

class  EnvironmentDrynessData
 

Enumerations

enum  EEnvironmentHeatcomfortBehaviorCategory { DEFAULT , CAR_ENGINE_ON }
 Categories that are changing behavior of Heat comfort processing. More...
 

Functions

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.
 
protected 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).
 
protected bool IsWaterContact ()
 Is character in contact with water body? (periodically checked - GameConstants.ENVIRO_TICK_RATE).
 
private bool IsChildOfType (array< typename > typenames)
 Returns true if character is child of given parent type(s)
 
private 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.
 
protected bool IsRaining ()
 Rain phenomenon actual value > RAIN_LIMIT_LOW.
 
protected bool IsSnowing ()
 Snowfall phenomenon actual value > SNOWFALL_LIMIT_LOW.
 
protected bool DetermineHeatcomfortBehavior ()
 Changes Heat Comfort curve behavior based on where the character is.
 
protected void CheckUnderRoof ()
 Checks whether character is sheltered and sets the information.
 
protected void CheckWaterContact (out float pWaterLevel)
 Checks player's contanct with water.
 
float GetWindModifierPerSurface ()
 Wind intensity (influence) modifier of temperature value.
 
float GetTemperature ()
 
float GetTargetHeatComfort ()
 
protected float GetEnvironmentTemperature ()
 Calculations of temperarute for different situations.
 
float GetWetDelta ()
 Calculates soaking/drying delta based on character's location and weather.
 
protected void CollectAndSetPlayerData ()
 Sets character related value for furher use.
 
protected 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)
 
protected void ProcessWetnessByWaterLevel (float pWaterLevel)
 Processes items wetness in player possession based on the current water level (the character is in)
 
protected void ProcessItemsWetness (array< int > pSlotIds)
 Soak items at specific Slot ID(s)
 
protected void ApplyWetnessToItem (ItemBase pItem)
 
protected void ProcessItemsDryness ()
 Dry items in player possession.
 
protected void ApplyDrynessToItem (ItemBase pItem)
 
protected void ApplyDrynessToItemEx (ItemBase pItem, EnvironmentDrynessData pDrynessData)
 
protected void ProcessHeatComfort ()
 Calculates and process player's heatcomfort related to defined body parts.
 
protected void SetTargetHeatComfort (float value)
 
protected void SetHeatcomfortDirectly ()
 
protected void ProcessHeatBuffer (EnvironmentSnapshotData data)
 
protected float GetApplicableHeatbuffer ()
 
protected void ProcessItemsTemperature (array< int > pBodyPartIds)
 Iterate through items in player posession (by given body parts) and cool/warm them to neutral temparature.
 
protected void ProcessItemsInHandsTemperature ()
 Process temperature of item in character hands and cool/warm it to neutral temparature.
 
protected void ProcessItemHierarchyRecursive (ItemBase item, float heatPermeabilityCoef=1.0)
 
protected void SetProcessedItemTemperature (ItemBase item, float heatPermeabilityCoef=1.0)
 
protected float EnvTempToCoef (float pTemp)
 
protected void BodyPartHeatProperties (int pBodyPartId, float pCoef, out float pHeatComfort, out float pHeat)
 Iterate through given body part and calculates heatcofort and item heat value.
 
protected float NakedBodyPartHeatComfortPenalty (int pBodyPartSlotId, float pCoef)
 Calculates penalty value for heatcomfort - this simulates uncovered body part reaction.
 
protected void GatherTemperatureSources ()
 Checks characters proximity for usable Universal Temperature Sources and register them.
 
protected void ProcessTemperatureSources ()
 Processes registered UTSources and calculates resulting m_UTSAverageTemperature.
 
protected void SetItemHeatingCoef (float val)
 
protected void OnTemperatureSourcesEnter ()
 Event fired when characters enters into UTSource proximity.
 
protected void OnTemperatureSourcesLeft ()
 Event fired when characters leave the UTSource proximity.
 
float GetUniversalSourcesTemperageAverage ()
 
float CalcTemperatureFromTemperatureSource (notnull UTemperatureSource uts)
 
string GetDebugMessage ()
 debug
 
int GetNextRoofCheck ()
 
float GetWaterLevel ()
 
private bool IsNeutralTemperature (float temperature, float lowerLimit=GameConstants.ITEM_TEMPERATURE_NEUTRAL_ZONE_LOWER_LIMIT, float upperLimit=GameConstants.ITEM_TEMPERATURE_NEUTRAL_ZONE_UPPER_LIMIT)
 
private 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
 
protected bool OverridenHeatComfort (out float value)
 
void AddToEnvironmentTemperature (float pTemperature)
 
protected void ProcessItemsHeat ()
 
protected void ProcessWetnessByRain ()
 
float GetTemperatureHeightCorrection ()
 
protected void BodyPartHeatProperties (array< int > pBodyPartIds, float pCoef, out float pHeatComfort, out float pHeat)
 returns weighted avg heat comfort for bodypart
 
protected void SetEnvironmentSnapshotData ()
 
protected void ProcessHeatBuffer (float heatComfortCloths)
 backward compatibility [<1.27]
 
protected float WindEffectTemperatureValue (float temperatureInput)
 backward compatibility [<1.28]
 
float GetDayOrNight ()
 
protected bool IsInsideVehicle ()
 

Variables

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.
 
protected const float SNOWFALL_LIMIT_LOW = 0.5
 
protected 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
 
protected float m_WetDryTick
 
protected float m_ItemsWetnessMax
 
protected float m_RoofCheckTimer
 keeps wetness of most wet item in player's possesion
 
protected PlayerBase m_Player
 
protected float m_PlayerHeightPos
 
protected float m_PlayerSpeed
 
protected float m_PlayerTemperature
 
protected float m_PlayerHeat
 
protected float m_HeatComfort
 
protected float m_Rain = 0
 target value of heatcomfort (non-buffered)
 
protected float m_Snowfall = 0
 
protected float m_Wind = 0
 
protected float m_Fog = 0
 
protected float m_DayOrNight = 0
 
protected float m_Clouds = 0
 
protected float m_EnvironmentTemperature
 
protected float m_Time = 0
 
protected string m_SurfaceType
 
protected int m_LiquidType
 
protected float m_ItemTemperatureCoef
 
protected float m_WaterLevel
 
protected bool m_IsUnderRoof
 
private bool m_IsUnderRoofBuilding
 
protected bool m_IsInWater
 
protected bool m_IsTempSet
 
protected float m_HeatBufferTimer
 
protected float m_HeatBufferCapPrevious
 reused as state toggle
 
protected ref array< intm_SlotIdsComplete
 
protected ref array< intm_SlotIdsUpper
 
protected ref array< intm_SlotIdsBottom
 
protected ref array< intm_SlotIdsLower
 
protected ref array< intm_HeadParts
 
protected ref array< intm_BodyParts
 
protected ref array< intm_FeetParts
 
protected WorldData m_WorldData
 
protected bool m_HasTemperatureSources
 
protected float m_UTSAverageTemperature
 
protected ref array< UTemperatureSource > m_UTemperatureSources
 
protected ref SimpleMovingAverage< floatm_UTSAverageTemperatureBuffer
 
protected ref SimpleMovingAverage< floatm_AverageHeatComfortBuffer
 
protected int m_HeatComfortBehaviorCategory
 
private bool m_Initialized
 
protected float m_HeatSourceTemp
 DEPRECATED.
 
protected ref SimpleMovingAverage< floatm_WindAverageBuffer
 
protected ref EnvironmentSnapshotData m_EnvironmentSnapshot
 

Enumeration Type Documentation

◆ EEnvironmentHeatcomfortBehaviorCategory

Categories that are changing behavior of Heat comfort processing.

Enumerator
DEFAULT 
CAR_ENGINE_ON 

Function Documentation

◆ AddToEnvironmentTemperature()

void AddToEnvironmentTemperature ( float  pTemperature)

◆ ApplyDrynessToItem()

protected void ApplyDrynessToItem ( ItemBase  pItem)

◆ ApplyDrynessToItemEx()

◆ ApplyWetnessToItem()

◆ BodyPartHeatProperties() [1/2]

protected void BodyPartHeatProperties ( array< int pBodyPartIds,
float  pCoef,
out float  pHeatComfort,
out float  pHeat 
)

returns weighted avg heat comfort for bodypart

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

References EnumTools::EnumToString(), GameConstants::ENVIRO_HEATISOLATION_BACK_WEIGHT, GameConstants::ENVIRO_HEATISOLATION_VEST_WEIGHT, GameConstants::ITEM_TEMPERATURE_NEUTRAL_ZONE_UPPER_LIMIT, m_Player, and NormalizedTemperature().

◆ BodyPartHeatProperties() [2/2]

protected void BodyPartHeatProperties ( int  pBodyPartId,
float  pCoef,
out float  pHeatComfort,
out float  pHeat 
)

Iterate through given body part and calculates heatcofort and item heat value.

Parameters
pBodyPartIdsList of body parts to iterate through (see InventorySlots)
pCoefMultiplier used for heatcomfort enhancing
[out]pHeatComfortoverall heatcomfort from items of given body part
[out]pHeatoverall heat from items for given body part

References EnumTools::EnumToString(), GameConstants::ITEM_TEMPERATURE_NEUTRAL_ZONE_UPPER_LIMIT, m_Player, and NormalizedTemperature().

Referenced by ProcessHeatComfort().

◆ CalcTemperatureFromTemperatureSource()

float CalcTemperatureFromTemperatureSource ( notnull UTemperatureSource  uts)

heat transfer through air to player (env temperature)

References vector::Distance(), Math::InverseLerp(), m_Player, and Math::Max().

Referenced by ProcessTemperatureSources().

◆ CheckUnderRoof()

protected void CheckUnderRoof ( )

Checks whether character is sheltered and sets the information.

if inside vehicle return immediatelly

References IsChildOfType(), m_IsUnderRoof, m_IsUnderRoofBuilding, m_Player, and DayZPhysics::RayCastBullet().

Referenced by Update().

◆ CheckWaterContact()

protected void CheckWaterContact ( out float  pWaterLevel)

Checks player's contanct with water.

Parameters
[out]pWaterLevelwater level height
Returns
Nothing

no valid surface under character

sync info about water contact to player

update active surface

References g_Game, DayZPlayer::GetCurrentWaterLevel(), IsChildOfType(), DayZPlayer::IsSwimming(), IsUnderRoofBuilding(), LIQUID_FRESHWATER, LIQUID_HOTWATER, LIQUID_RIVERWATER, LIQUID_SALTWATER, LIQUID_STILLWATER, LIQUID_WATER, HumanMovementState::m_iMovement, m_IsInWater, m_LiquidType, m_Player, m_SurfaceType, WATER_LEVEL_HIGH, and WATER_LEVEL_MID.

Referenced by Update().

◆ CollectAndSetEnvironmentData()

protected void CollectAndSetEnvironmentData ( )

◆ CollectAndSetPlayerData()

protected void CollectAndSetPlayerData ( )

Sets character related value for furher use.

  • position

movement speed

  • player heat (actual speed * heat constant)

References HumanCommandMove::GetCurrentMovementSpeed(), GetPlayerHeat(), m_Player, m_PlayerHeat, m_PlayerHeightPos, and m_PlayerSpeed.

Referenced by Update().

◆ DetermineHeatcomfortBehavior()

protected bool DetermineHeatcomfortBehavior ( )

Changes Heat Comfort curve behavior based on where the character is.

Returns
true if the behavior is altered otherwise false

References IsChildOfType(), m_HeatComfortBehaviorCategory, and m_Player.

Referenced by Update().

◆ Environment()

void Environment ( PlayerBase  pPlayer)

References m_Player.

Referenced by ManBase::Init().

◆ EnvTempToCoef()

◆ GatherTemperatureSources()

protected void GatherTemperatureSources ( )

Checks characters proximity for usable Universal Temperature Sources and register them.

skip - Temperature Source is not affecting player entities

skip - Temperature Source is too far

References DayZPlayerUtils(), vector::DistanceSq(), GameConstants::ENVIRO_TEMP_SOURCES_LOOKUP_RADIUS, m_Player, m_UTemperatureSources, Math::SqrFloat(), and Vector().

Referenced by PluginBase::SendDebug(), and Update().

◆ GetApplicableHeatbuffer()

protected float GetApplicableHeatbuffer ( )

References m_Player, and Math::Round().

Referenced by ProcessHeatBuffer().

◆ GetDayOrNight()

float GetDayOrNight ( )

References m_DayOrNight.

◆ GetDebugMessage()

◆ GetEnvironmentTemperature()

◆ GetNextRoofCheck()

int GetNextRoofCheck ( )

◆ GetPlayerHeat()

protected float GetPlayerHeat ( )

Character's heat (calculated from movement speed multiplied by constant)

Returns
generated heat value

References GameConstants::ENVIRO_DEFAULT_ENTITY_HEAT, and m_PlayerSpeed.

Referenced by CollectAndSetPlayerData(), and ProcessHeatComfort().

◆ GetTargetHeatComfort()

float GetTargetHeatComfort ( )

References m_TargetHeatComfort.

Referenced by GetDebugMessage().

◆ GetTemperature()

◆ GetTemperatureHeightCorrection()

◆ GetUniversalSourcesTemperageAverage()

float GetUniversalSourcesTemperageAverage ( )

◆ GetWaterLevel()

float GetWaterLevel ( )

◆ GetWetDelta()

◆ GetWindModifierPerSurface()

float GetWindModifierPerSurface ( )

Wind intensity (influence) modifier of temperature value.

Returns
float modifier used in temperature calculations

References g_Game, IsUnderRoofBuilding(), and m_SurfaceType.

Referenced by GetDebugMessage(), and GetEnvironmentTemperature().

◆ Init() [1/2]

void Init ( )

◆ Init() [2/2]

void Init ( PlayerBase  pPlayer)

used for calculations before the data modification

References Init().

◆ IsChildOfType()

private bool IsChildOfType ( array< typename typenames)

Returns true if character is child of given parent type(s)

Parameters
typenameslist of types to check against

References m_Player.

Referenced by CheckUnderRoof(), CheckWaterContact(), DetermineHeatcomfortBehavior(), GetEnvironmentTemperature(), GetWetDelta(), IsInsideVehicle(), NakedBodyPartHeatComfortPenalty(), and Update().

◆ IsInsideBuilding()

bool IsInsideBuilding ( )

Is character inside building? (periodically checked - GameConstants.ENVIRO_TICK_ROOF_RC_CHECK).

References m_Player.

Referenced by GetDebugMessage(), GetEnvironmentTemperature(), GetWetDelta(), NakedBodyPartHeatComfortPenalty(), and Update().

◆ IsInsideVehicle()

protected bool IsInsideVehicle ( )

References IsChildOfType().

◆ IsNeutralTemperature()

private bool IsNeutralTemperature ( float  temperature,
float  lowerLimit = GameConstants.ITEM_TEMPERATURE_NEUTRAL_ZONE_LOWER_LIMIT,
float  upperLimit = GameConstants.ITEM_TEMPERATURE_NEUTRAL_ZONE_UPPER_LIMIT 
)

◆ IsRaining()

protected bool IsRaining ( )

Rain phenomenon actual value > RAIN_LIMIT_LOW.

References m_Rain, and RAIN_LIMIT_LOW.

Referenced by GetWetDelta(), and Update().

◆ IsSnowing()

protected bool IsSnowing ( )

Snowfall phenomenon actual value > SNOWFALL_LIMIT_LOW.

References m_Snowfall, and SNOWFALL_LIMIT_LOW.

Referenced by GetWetDelta(), and Update().

◆ IsTemperatureSet()

bool IsTemperatureSet ( )

For safe-guards, waiting for the proper temperature to be set.

References m_IsTempSet.

◆ IsUnderRoof()

bool IsUnderRoof ( )

Is character under roof (periodically checked - GameConstants.ENVIRO_TICK_ROOF_RC_CHECK). Runs when player is not inside of building.

References m_IsUnderRoof.

Referenced by GetEnvironmentTemperature(), GetWetDelta(), NakedBodyPartHeatComfortPenalty(), and Update().

◆ IsUnderRoofBuilding()

private 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.

References m_IsUnderRoofBuilding.

Referenced by CheckWaterContact(), and GetWindModifierPerSurface().

◆ IsWaterContact()

protected bool IsWaterContact ( )

Is character in contact with water body? (periodically checked - GameConstants.ENVIRO_TICK_RATE).

References m_IsInWater.

Referenced by GetDebugMessage(), GetEnvironmentTemperature(), GetWaterLevel(), GetWetDelta(), NakedBodyPartHeatComfortPenalty(), and Update().

◆ NakedBodyPartHeatComfortPenalty()

protected float NakedBodyPartHeatComfortPenalty ( int  pBodyPartSlotId,
float  pCoef 
)

Calculates penalty value for heatcomfort - this simulates uncovered body part reaction.

Parameters
pBodyPartSlotIdInventorySlot ID to check
pCoefexternal coefficient used for that slot
Returns
Value of penalty for given slot ID

References GameConstants::ENVIRO_ISOLATION_WETFACTOR_DRENCHED, GameConstants::ENVIRO_NAKED_BODY_PENALTY_RAIN_MIN_VALUE, GameConstants::ENVIRO_NAKED_BODY_PENALTY_SNOWFALL_MIN_VALUE, IsChildOfType(), IsInsideBuilding(), IsUnderRoof(), IsWaterContact(), m_Rain, and m_Snowfall.

Referenced by ProcessHeatComfort().

◆ NormalizedTemperature()

◆ OnTemperatureSourcesEnter()

protected void OnTemperatureSourcesEnter ( )

Event fired when characters enters into UTSource proximity.

Referenced by ProcessTemperatureSources().

◆ OnTemperatureSourcesLeft()

protected void OnTemperatureSourcesLeft ( )

Event fired when characters leave the UTSource proximity.

Referenced by ProcessTemperatureSources().

◆ OverridenHeatComfort()

protected bool OverridenHeatComfort ( out float  value)

◆ ProcessHeatBuffer() [1/2]

◆ ProcessHeatBuffer() [2/2]

protected void ProcessHeatBuffer ( float  heatComfortCloths)

backward compatibility [<1.27]

References m_EnvironmentSnapshot, m_TargetHeatComfort, and ProcessHeatBuffer().

◆ ProcessHeatComfort()

◆ ProcessItemHierarchyRecursive()

◆ ProcessItemsDryness()

◆ ProcessItemsHeat()

protected void ProcessItemsHeat ( )

References ProcessHeatComfort().

◆ ProcessItemsInHandsTemperature()

protected void ProcessItemsInHandsTemperature ( )

Process temperature of item in character hands and cool/warm it to neutral temparature.

References ItemBase::IsSelfAdjustingTemperature(), m_Player, ProcessItemHierarchyRecursive(), and SetProcessedItemTemperature().

Referenced by Update().

◆ ProcessItemsTemperature()

protected void ProcessItemsTemperature ( array< int pBodyPartIds)

Iterate through items in player posession (by given body parts) and cool/warm them to neutral temparature.

Parameters
pBodyPartIdsList of body parts to iterate through (see InventorySlots)

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

References ItemBase::IsSelfAdjustingTemperature(), m_Player, ProcessItemHierarchyRecursive(), and SetProcessedItemTemperature().

Referenced by Update().

◆ ProcessItemsWetness()

protected void ProcessItemsWetness ( array< int pSlotIds)

Soak items at specific Slot ID(s)

Parameters
pSlotIdsInventory Slot IDs to process

References ApplyWetnessToItem(), GameConstants::ENVIRO_TICK_RATE, and m_Player.

Referenced by ProcessWetnessByRain(), ProcessWetnessByWaterLevel(), and Update().

◆ ProcessTemperatureSources()

protected void ProcessTemperatureSources ( )

Processes registered UTSources and calculates resulting m_UTSAverageTemperature.

adds average of 2 most significat sources to buffer

References CalcTemperatureFromTemperatureSource(), m_HasTemperatureSources, m_UTemperatureSources, m_UTSAverageTemperature, m_UTSAverageTemperatureBuffer, OnTemperatureSourcesEnter(), OnTemperatureSourcesLeft(), SetItemHeatingCoef(), and GameConstants::TEMP_COEF_INVENTORY.

Referenced by Update().

◆ ProcessWetnessByRain()

protected void ProcessWetnessByRain ( )

◆ ProcessWetnessByWaterLevel()

protected void ProcessWetnessByWaterLevel ( float  pWaterLevel)

Processes items wetness in player possession based on the current water level (the character is in)

Parameters
pWaterLevelWater level height

References m_SlotIdsBottom, m_SlotIdsComplete, m_SlotIdsLower, m_SlotIdsUpper, ProcessItemsWetness(), WATER_LEVEL_HIGH, WATER_LEVEL_LOW, WATER_LEVEL_MID, and WATER_LEVEL_NONE.

Referenced by Update().

◆ SetAreaGenericColdness()

void SetAreaGenericColdness ( )

Determines whether player is in cold area which restricts use of some actions (digging)

References GameConstants::COLD_AREA_TEMPERATURE_THRESHOLD, WorldData::GetBaseEnvTemperatureAtObject(), m_Player, and m_WorldData.

Referenced by CollectAndSetEnvironmentData().

◆ SetEnvironmentSnapshotData()

protected void SetEnvironmentSnapshotData ( )

◆ SetEnvironmentTemperature()

void SetEnvironmentTemperature ( )

◆ SetHeatcomfortDirectly()

protected void SetHeatcomfortDirectly ( )

◆ SetItemHeatingCoef()

protected void SetItemHeatingCoef ( float  val)

◆ SetProcessedItemTemperature()

◆ SetTargetHeatComfort()

protected void SetTargetHeatComfort ( float  value)

◆ Update()

◆ WindEffectTemperatureValue()

protected float WindEffectTemperatureValue ( float  temperatureInput)

Variable Documentation

◆ m_AverageHeatComfortBuffer

protected ref SimpleMovingAverage<float> m_AverageHeatComfortBuffer

◆ m_BodyParts

protected ref array<int> m_BodyParts

Referenced by Init(), and Update().

◆ m_ClothingHeatComfort

enum EEnvironmentHeatcomfortBehaviorCategory m_ClothingHeatComfort

◆ m_Clouds

protected float m_Clouds = 0

◆ m_DayOrNight

protected float m_DayOrNight = 0

◆ m_EnvironmentSnapshot

protected ref EnvironmentSnapshotData m_EnvironmentSnapshot

◆ m_EnvironmentTemperature

protected float m_EnvironmentTemperature

◆ m_FeetParts

protected ref array<int> m_FeetParts

Referenced by Init(), and Update().

◆ m_Fog

protected float m_Fog = 0

◆ m_HasTemperatureSources

protected bool m_HasTemperatureSources

◆ m_HeadParts

protected ref array<int> m_HeadParts

Referenced by Init(), and Update().

◆ m_HeatBufferCapPrevious

protected float m_HeatBufferCapPrevious

reused as state toggle

Referenced by ProcessHeatBuffer().

◆ m_HeatBufferTimer

protected float m_HeatBufferTimer

Referenced by Init(), and ProcessHeatBuffer().

◆ m_HeatComfort

◆ m_HeatComfortBehaviorCategory

protected int m_HeatComfortBehaviorCategory

◆ m_HeatSourceTemp

protected float m_HeatSourceTemp

DEPRECATED.

◆ m_Initialized

private bool m_Initialized

◆ m_IsInWater

◆ m_IsTempSet

protected bool m_IsTempSet

◆ m_IsUnderRoof

protected bool m_IsUnderRoof

◆ m_IsUnderRoofBuilding

private bool m_IsUnderRoofBuilding

◆ m_ItemsWetnessMax

protected float m_ItemsWetnessMax

◆ m_ItemTemperatureCoef

protected float m_ItemTemperatureCoef

◆ m_LiquidType

◆ m_Player

protected PlayerBase m_Player

◆ m_PlayerHeat

protected float m_PlayerHeat

◆ m_PlayerHeightPos

protected float m_PlayerHeightPos

◆ m_PlayerSpeed

protected float m_PlayerSpeed

◆ m_PlayerTemperature

protected float m_PlayerTemperature

◆ m_Rain

protected float m_Rain = 0

target value of heatcomfort (non-buffered)

Referenced by CollectAndSetEnvironmentData(), GetDebugMessage(), GetWetDelta(), IsRaining(), and NakedBodyPartHeatComfortPenalty().

◆ m_RoofCheckTimer

protected float m_RoofCheckTimer

keeps wetness of most wet item in player's possesion

Referenced by GetNextRoofCheck(), Init(), and Update().

◆ m_SlotIdsBottom

protected ref array<int> m_SlotIdsBottom

Referenced by Init(), and ProcessWetnessByWaterLevel().

◆ m_SlotIdsComplete

protected ref array<int> m_SlotIdsComplete

◆ m_SlotIdsLower

protected ref array<int> m_SlotIdsLower

Referenced by Init(), and ProcessWetnessByWaterLevel().

◆ m_SlotIdsUpper

protected ref array<int> m_SlotIdsUpper

Referenced by Init(), and ProcessWetnessByWaterLevel().

◆ m_Snowfall

◆ m_SurfaceType

protected string m_SurfaceType

◆ m_TargetHeatComfort

protected float m_TargetHeatComfort

player's heatcomfort (buffered, stored in player stats)

Referenced by GetTargetHeatComfort(), ProcessHeatBuffer(), SetEnvironmentSnapshotData(), and SetTargetHeatComfort().

◆ m_Time

◆ m_UTemperatureSources

protected ref array<UTemperatureSource> m_UTemperatureSources

◆ m_UTSAverageTemperature

◆ m_UTSAverageTemperatureBuffer

protected ref SimpleMovingAverage<float> m_UTSAverageTemperatureBuffer

Referenced by Init(), and ProcessTemperatureSources().

◆ m_WaterLevel

◆ m_WetDryTick

protected float m_WetDryTick

Referenced by Init(), and Update().

◆ m_Wind

◆ m_WindAverageBuffer

protected ref SimpleMovingAverage<float> m_WindAverageBuffer

◆ m_WorldData

◆ RAIN_LIMIT_LOW

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.

Referenced by IsRaining().

◆ SNOWFALL_LIMIT_LOW

protected const float SNOWFALL_LIMIT_LOW = 0.5

Referenced by GetWetDelta(), and IsSnowing().

◆ SNOWFALL_WIND_COMBINED_THRESHOLD

protected const float SNOWFALL_WIND_COMBINED_THRESHOLD = 1.3

Referenced by GetWetDelta(), and Update().

◆ WATER_LEVEL_HIGH

const float WATER_LEVEL_HIGH = 1.5

◆ WATER_LEVEL_LOW

const float WATER_LEVEL_LOW = 0.5

◆ WATER_LEVEL_MID

const float WATER_LEVEL_MID = 1.2

◆ WATER_LEVEL_NONE

const float WATER_LEVEL_NONE = 0.15