![]() |
Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
|
Go to the source code of this file.
Data Structures | |
| class | EnvironmentDrynessData |
Enumerations | |
| enum | EEnvironmentHeatcomfortBehaviorCategory { DEFAULT , CAR_ENGINE_ON } |
| Categories that are changing behavior of Heat comfort processing. More... | |
Functions | |
| void | AddToEnvironmentTemperature (float pTemperature) |
| void | ApplyDrynessToItem (ItemBase pItem) |
| void | ApplyDrynessToItemEx (ItemBase pItem, EnvironmentDrynessData pDrynessData) |
| void | ApplyWetnessToItem (ItemBase pItem) |
| void | BodyPartHeatProperties (array< int > pBodyPartIds, float pCoef, out float pHeatComfort, out float pHeat) |
| returns weighted avg heat comfort for bodypart | |
| 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 | CalcTemperatureFromTemperatureSource (notnull UTemperatureSource uts) |
| void | CheckUnderRoof () |
| Checks whether character is sheltered and sets the information. | |
| void | CheckWaterContact (out float pWaterLevel) |
| Checks player's contanct with water. | |
| void | CollectAndSetEnvironmentData () |
| Sets actual weather related values for further use (rain, snow, wind, etc.). | |
| void | CollectAndSetPlayerData () |
| Sets character related value for furher use. | |
| bool | DetermineHeatcomfortBehavior () |
| Changes Heat Comfort curve behavior based on where the character is. | |
| void | Environment (PlayerBase pPlayer) |
| float | EnvTempToCoef (float pTemp) |
| void | GatherTemperatureSources () |
| Checks characters proximity for usable Universal Temperature Sources and register them. | |
| float | GetApplicableHeatbuffer () |
| float | GetDayOrNight () |
| string | GetDebugMessage () |
| debug | |
| float | GetEnvironmentTemperature () |
| Calculations of temperarute for different situations. | |
| int | GetNextRoofCheck () |
| float | GetPlayerHeat () |
| Character's heat (calculated from movement speed multiplied by constant). | |
| float | GetTargetHeatComfort () |
| float | GetTemperature () |
| float | GetTemperatureHeightCorrection () |
| float | GetUniversalSourcesTemperageAverage () |
| float | GetWaterLevel () |
| float | GetWetDelta () |
| Calculates soaking/drying delta based on character's location and weather. | |
| float | GetWindModifierPerSurface () |
| Wind intensity (influence) modifier of temperature value. | |
| void | Init () |
| void | Init (PlayerBase pPlayer) |
| used for calculations before the data modification | |
| bool | IsChildOfType (array< typename > typenames) |
| Returns true if character is child of given parent type(s). | |
| bool | IsInsideBuilding () |
| Is character inside building? | |
| bool | IsInsideVehicle () |
| bool | IsNeutralTemperature (float temperature, float lowerLimit=GameConstants.ITEM_TEMPERATURE_NEUTRAL_ZONE_LOWER_LIMIT, float upperLimit=GameConstants.ITEM_TEMPERATURE_NEUTRAL_ZONE_UPPER_LIMIT) |
| bool | IsRaining () |
| Rain phenomenon actual value > RAIN_LIMIT_LOW. | |
| bool | IsSnowing () |
| Snowfall phenomenon actual value > SNOWFALL_LIMIT_LOW. | |
| bool | IsTemperatureSet () |
| For safe-guards, waiting for the proper temperature to be set. | |
| bool | IsUnderRoof () |
| Is character under roof (periodically checked - GameConstants.ENVIRO_TICK_ROOF_RC_CHECK). | |
| bool | IsUnderRoofBuilding () |
| Is character under building's roof (periodically checked - GameConstants.ENVIRO_TICK_ROOF_RC_CHECK). | |
| bool | IsWaterContact () |
| Is character in contact with water body? | |
| float | NakedBodyPartHeatComfortPenalty (int pBodyPartSlotId, float pCoef) |
| Calculates penalty value for heatcomfort - this simulates uncovered body part reaction. | |
| float | NormalizedTemperature (float temperature, float lowerLimit=GameConstants.ENVIRO_LOW_TEMP_LIMIT, float upperLimit=GameConstants.ENVIRO_HIGH_TEMP_LIMIT) |
| void | OnTemperatureSourcesEnter () |
| Event fired when characters enters into UTSource proximity. | |
| void | OnTemperatureSourcesLeft () |
| Event fired when characters leave the UTSource proximity. | |
| bool | OverridenHeatComfort (out float value) |
| void | ProcessHeatBuffer (EnvironmentSnapshotData data) |
| void | ProcessHeatBuffer (float heatComfortCloths) |
| backward compatibility [<1.27] | |
| void | ProcessHeatComfort () |
| Calculates and process player's heatcomfort related to defined body parts. | |
| void | ProcessItemHierarchyRecursive (ItemBase item, float heatPermeabilityCoef=1.0) |
| void | ProcessItemsDryness () |
| Dry items in player possession. | |
| void | ProcessItemsHeat () |
| void | ProcessItemsInHandsTemperature () |
| Process temperature of item in character hands and cool/warm it to neutral temparature. | |
| void | ProcessItemsTemperature (array< int > pBodyPartIds) |
| Iterate through items in player posession (by given body parts) and cool/warm them to neutral temparature. | |
| void | ProcessItemsWetness (array< int > pSlotIds) |
| Soak items at specific Slot ID(s). | |
| void | ProcessTemperatureSources () |
| Processes registered UTSources and calculates resulting m_UTSAverageTemperature. | |
| void | ProcessWetnessByRain () |
| void | ProcessWetnessByWaterLevel (float pWaterLevel) |
| Processes items wetness in player possession based on the current water level (the character is in). | |
| void | SetAreaGenericColdness () |
| Determines whether player is in cold area which restricts use of some actions (digging). | |
| void | SetEnvironmentSnapshotData () |
| void | SetEnvironmentTemperature () |
| void | SetHeatcomfortDirectly () |
| void | SetItemHeatingCoef (float val) |
| void | SetProcessedItemTemperature (ItemBase item, float heatPermeabilityCoef=1.0) |
| void | SetTargetHeatComfort (float value) |
| void | Update (float pDelta) |
| Main loop that runs calculations for various Environment parts (wetness, heatcomfort, watercontact, etc.). | |
| float | WindEffectTemperatureValue (float temperatureInput) |
| backward compatibility [<1.28] | |
Categories that are changing behavior of Heat comfort processing.
| Enumerator | |
|---|---|
| DEFAULT | |
| CAR_ENGINE_ON | |
Definition at line 4 of file environment.c.
|
protected |
|
protected |
Definition at line 869 of file environment.c.
References ApplyDrynessToItemEx().
|
protected |
adds wetness to item inside parent item containing liquid
adds wetness to item inside wet parent item
Definition at line 875 of file environment.c.
References ApplyDrynessToItemEx(), Class::CastTo(), GameConstants::ENVIRO_TICK_RATE, InventoryLocation::GetParent(), m_ItemsWetnessMax, EnvironmentDrynessData::m_TemperatureSourceDistance, EnvironmentDrynessData::m_UseTemperatureSources, GameConstants::STATE_DAMP, and GameConstants::STATE_SOAKING_WET.
Referenced by ApplyDrynessToItem(), ApplyDrynessToItemEx(), and ProcessItemsDryness().
|
protected |
Definition at line 735 of file environment.c.
References ApplyWetnessToItem(), Class::CastTo(), GameConstants::ENVIRO_TICK_RATE, InventoryLocation::GetParent(), GetWetDelta(), m_ItemsWetnessMax, and GameConstants::STATE_SOAKING_WET.
Referenced by ApplyWetnessToItem(), and ProcessItemsWetness().
|
protected |
returns weighted avg heat comfort for bodypart
go through all body parts we've defined for that zone (ex.: head, body, feet)
Definition at line 1798 of file environment.c.
References EnumTools::EnumToString(), GameConstants::ENVIRO_HEATISOLATION_BACK_WEIGHT, GameConstants::ENVIRO_HEATISOLATION_VEST_WEIGHT, GameConstants::ITEM_TEMPERATURE_NEUTRAL_ZONE_UPPER_LIMIT, and NormalizedTemperature().
|
protected |
Iterate through given body part and calculates heatcofort and item heat value.
| pBodyPartIds | List of body parts to iterate through (see InventorySlots) | |
| pCoef | Multiplier used for heatcomfort enhancing | |
| [out] | pHeatComfort | overall heatcomfort from items of given body part |
| [out] | pHeat | overall heat from items for given body part |
Definition at line 1356 of file environment.c.
References GameInventory::AttachmentCount(), EnumTools::EnumToString(), GameInventory::GetAttachmentFromIndex(), GameInventory::GetCargo(), CargoBase::GetItem(), CargoBase::GetItemCount(), GameConstants::ITEM_TEMPERATURE_NEUTRAL_ZONE_UPPER_LIMIT, and NormalizedTemperature().
Referenced by ProcessHeatComfort().
|
protected |
heat transfer through air to player (env temperature)
Definition at line 1576 of file environment.c.
References vector::Distance(), Math::InverseLerp(), and Math::Max().
Referenced by ProcessTemperatureSources().
|
protected |
Checks whether character is sheltered and sets the information.
if inside vehicle return immediatelly
Definition at line 391 of file environment.c.
References IsChildOfType(), m_IsUnderRoof, m_IsUnderRoofBuilding, and DayZPhysics::RayCastBullet().
Referenced by Update().
|
protected |
Checks player's contanct with water.
| [out] | pWaterLevel | water level height |
no valid surface under character
sync info about water contact to player
update active surface
Definition at line 421 of file environment.c.
References g_Game, IsChildOfType(), IsUnderRoofBuilding(), LIQUID_FRESHWATER, LIQUID_HOTWATER, LIQUID_RIVERWATER, LIQUID_SALTWATER, LIQUID_STILLWATER, LIQUID_WATER, HumanMovementState::m_iMovement, m_IsInWater, m_LiquidType, m_SurfaceType, WATER_LEVEL_HIGH, and WATER_LEVEL_MID.
Referenced by Update().
|
protected |
Sets actual weather related values for further use (rain, snow, wind, etc.).
Definition at line 644 of file environment.c.
References g_Game, WeatherPhenomenon::GetActual(), Weather::GetFog(), Weather::GetOvercast(), Weather::GetRain(), Weather::GetSnowfall(), Weather::GetWindMagnitude(), m_Clouds, m_DayOrNight, m_Fog, m_Rain, m_Snowfall, m_Wind, SetAreaGenericColdness(), and SetEnvironmentTemperature().
Referenced by Update().
|
protected |
Sets character related value for furher use.
movement speed
Definition at line 626 of file environment.c.
References HumanCommandMove::GetCurrentMovementSpeed(), GetPlayerHeat(), m_PlayerHeat, m_PlayerHeightPos, and m_PlayerSpeed.
Referenced by Update().
|
protected |
Changes Heat Comfort curve behavior based on where the character is.
Definition at line 369 of file environment.c.
References IsChildOfType(), and m_HeatComfortBehaviorCategory.
Referenced by Update().
|
private |
Definition at line 106 of file environment.c.
Referenced by ManBase::Init().
Definition at line 1344 of file environment.c.
References GameConstants::ENVIRO_PLAYER_COMFORT_TEMP, and GameConstants::ENVIRO_TEMP_EFFECT_ON_PLAYER.
Referenced by ProcessHeatComfort().
|
protected |
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
Definition at line 1476 of file environment.c.
References DayZPlayerUtils(), vector::DistanceSq(), GameConstants::ENVIRO_TEMP_SOURCES_LOOKUP_RADIUS, m_UTemperatureSources, Math::SqrFloat(), and Vector().
Referenced by PluginBase::SendDebug(), and Update().
|
protected |
Definition at line 1205 of file environment.c.
References PlayerStat(), and Math::Round().
Referenced by ProcessHeatBuffer().
|
protected |
Definition at line 1928 of file environment.c.
References m_DayOrNight.
|
protected |
debug
Definition at line 1663 of file environment.c.
References g_Game, GetNextRoofCheck(), GetTargetHeatComfort(), GetWetDelta(), GetWindModifierPerSurface(), IsInsideBuilding(), IsWaterContact(), m_Clouds, m_DayOrNight, m_EnvironmentTemperature, m_Fog, m_HeatComfort, m_IsUnderRoof, m_Rain, m_Snowfall, m_WaterLevel, m_Wind, m_WorldData, bool::ToString(), float::ToString(), WorldDataDaytime::ToString(), and WATER_LEVEL_NONE.
|
protected |
Calculations of temperarute for different situations.
Definition at line 520 of file environment.c.
References Math::AbsFloat(), GameConstants::ENVIRO_TEMPERATURE_INSIDE_VEHICLE_COEF, GameConstants::ENVIRO_TEMPERATURE_UNDERROOF_COEF, GetWindModifierPerSurface(), IsChildOfType(), IsInsideBuilding(), IsUnderRoof(), IsWaterContact(), m_IsUnderRoofBuilding, m_LiquidType, m_UTSAverageTemperature, m_WorldData, and WindEffectTemperatureValue().
Referenced by GetWetDelta(), and SetEnvironmentTemperature().
|
protected |
Definition at line 1698 of file environment.c.
References GameConstants::ENVIRO_TICK_ROOF_RC_CHECK, and m_RoofCheckTimer.
Referenced by GetDebugMessage().
|
protected |
Character's heat (calculated from movement speed multiplied by constant).
Definition at line 295 of file environment.c.
References GameConstants::ENVIRO_DEFAULT_ENTITY_HEAT, and m_PlayerSpeed.
Referenced by CollectAndSetPlayerData(), and ProcessHeatComfort().
|
protected |
Definition at line 505 of file environment.c.
References m_TargetHeatComfort.
Referenced by GetDebugMessage().
|
protected |
Definition at line 500 of file environment.c.
References m_EnvironmentTemperature.
Referenced by Entity::AddTemperature(), AddTemperatureToItemByFire(), AddWetnessToFireplace(), Bottle_Base::AffectLiquidContainerOnFill(), FilteringBottle::AffectLiquidContainerOnFill(), Bottle_Base::AffectLiquidContainerOnTransfer(), FilteringBottle::AffectLiquidContainerOnTransfer(), CanCookOnStick(), CanDismantleOven(), CanPutIntoHands(), Cooling(), InventoryItem::DoAmmoExplosion(), InventoryItem::EEKilled(), GetCookingTargetTemperature(), Entity::HandleFreezingProgression(), Heating(), Entity::InitTemperature(), Entity::InterpolateTempData(), Edible_Base::OnConsume(), OnVariablesSynchronized(), InventoryItem::ProcessItemTemperature(), Entity::ProcessVariables(), RefreshFireState(), Entity::SetTemperatureEx(), Entity::SetTemperatureMax(), and Entity::WriteVarsToCTX().
|
protected |
Definition at line 1791 of file environment.c.
References m_PlayerHeightPos, m_WorldData, and Math::Max().
|
protected |
Definition at line 1571 of file environment.c.
References m_UTSAverageTemperature.
|
protected |
Definition at line 1703 of file environment.c.
References IsWaterContact(), m_WaterLevel, and WATER_LEVEL_NONE.
|
protected |
Calculates soaking/drying delta based on character's location and weather.
player is getting wet by movement/swimming in water (+differentiate wetDelta by water level)
player is drying
Definition at line 566 of file environment.c.
References GameConstants::ENVIRO_CLOUD_DRY_EFFECT, GameConstants::ENVIRO_DRY_INCREMENT, GameConstants::ENVIRO_FOG_DRY_EFFECT, GameConstants::ENVIRO_SNOW_WET_COEF, GameConstants::ENVIRO_TICKS_TO_WETNESS_CALCULATION, GameConstants::ENVIRO_WET_INCREMENT, GameConstants::ENVIRO_WIND_EFFECT, GetEnvironmentTemperature(), IsChildOfType(), IsInsideBuilding(), IsRaining(), IsSnowing(), IsUnderRoof(), IsWaterContact(), m_Clouds, m_Fog, m_PlayerHeat, m_Rain, m_Snowfall, m_WaterLevel, m_Wind, Math::Max(), SNOWFALL_LIMIT_LOW, SNOWFALL_WIND_COMBINED_THRESHOLD, WATER_LEVEL_HIGH, WATER_LEVEL_LOW, WATER_LEVEL_MID, and WATER_LEVEL_NONE.
Referenced by ApplyWetnessToItem(), and GetDebugMessage().
|
protected |
Wind intensity (influence) modifier of temperature value.
Definition at line 492 of file environment.c.
References g_Game, IsUnderRoofBuilding(), and m_SurfaceType.
Referenced by GetDebugMessage(), and GetEnvironmentTemperature().
|
private |
whole body slots
upper body part slots
bottom body part slots
lower body part slots
heat comfort related slots
Definition at line 111 of file environment.c.
References g_Game, m_AverageHeatComfortBuffer, m_BodyParts, m_EnvironmentSnapshot, m_EnvironmentTemperature, m_FeetParts, m_HeadParts, m_HeatBufferTimer, m_HeatComfort, m_HeatComfortBehaviorCategory, m_Initialized, m_IsInWater, m_IsUnderRoof, m_PlayerSpeed, m_RoofCheckTimer, m_SlotIdsBottom, m_SlotIdsComplete, m_SlotIdsLower, m_SlotIdsUpper, m_SurfaceType, m_UTemperatureSources, m_UTSAverageTemperature, m_UTSAverageTemperatureBuffer, m_WaterLevel, m_WetDryTick, and m_WorldData.
|
protected |
used for calculations before the data modification
Definition at line 1771 of file environment.c.
References Init().
Returns true if character is child of given parent type(s).
| typenames | list of types to check against |
Definition at line 330 of file environment.c.
Referenced by CheckUnderRoof(), CheckWaterContact(), DetermineHeatcomfortBehavior(), GetEnvironmentTemperature(), GetWetDelta(), IsInsideVehicle(), NakedBodyPartHeatComfortPenalty(), and Update().
|
protected |
Is character inside building?
(periodically checked - GameConstants.ENVIRO_TICK_ROOF_RC_CHECK).
Definition at line 313 of file environment.c.
Referenced by GetDebugMessage(), GetEnvironmentTemperature(), GetWetDelta(), NakedBodyPartHeatComfortPenalty(), and Update().
|
protected |
Definition at line 1933 of file environment.c.
References IsChildOfType().
|
private |
Definition at line 1713 of file environment.c.
|
protected |
Rain phenomenon actual value > RAIN_LIMIT_LOW.
Definition at line 351 of file environment.c.
References m_Rain, and RAIN_LIMIT_LOW.
Referenced by GetWetDelta(), and Update().
|
protected |
Snowfall phenomenon actual value > SNOWFALL_LIMIT_LOW.
Definition at line 359 of file environment.c.
References m_Snowfall, and SNOWFALL_LIMIT_LOW.
Referenced by GetWetDelta(), and Update().
|
private |
For safe-guards, waiting for the proper temperature to be set.
Definition at line 286 of file environment.c.
References m_IsTempSet.
|
protected |
Is character under roof (periodically checked - GameConstants.ENVIRO_TICK_ROOF_RC_CHECK).
Runs when player is not inside of building
Definition at line 305 of file environment.c.
References m_IsUnderRoof.
Referenced by GetEnvironmentTemperature(), GetWetDelta(), NakedBodyPartHeatComfortPenalty(), and Update().
|
private |
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
Definition at line 343 of file environment.c.
References m_IsUnderRoofBuilding.
Referenced by CheckWaterContact(), and GetWindModifierPerSurface().
|
protected |
Is character in contact with water body?
(periodically checked - GameConstants.ENVIRO_TICK_RATE).
Definition at line 321 of file environment.c.
References m_IsInWater.
Referenced by GetDebugMessage(), GetEnvironmentTemperature(), GetWaterLevel(), GetWetDelta(), NakedBodyPartHeatComfortPenalty(), and Update().
Calculates penalty value for heatcomfort - this simulates uncovered body part reaction.
| pBodyPartSlotId | InventorySlot ID to check |
| pCoef | external coefficient used for that slot |
Definition at line 1455 of file environment.c.
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().
|
private |
Definition at line 1721 of file environment.c.
References Math::Clamp(), Math::InverseLerp(), GameConstants::ITEM_TEMPERATURE_NEUTRAL_ZONE_LOWER_LIMIT, and GameConstants::ITEM_TEMPERATURE_NEUTRAL_ZONE_UPPER_LIMIT.
Referenced by BodyPartHeatProperties(), and BodyPartHeatProperties().
|
protected |
Event fired when characters enters into UTSource proximity.
Referenced by ProcessTemperatureSources().
|
protected |
Event fired when characters leave the UTSource proximity.
Referenced by ProcessTemperatureSources().
|
protected |
dynamic HB cap based on actual heatcomfort (from cloths)
deplete the heat buffer if there is difference in HB capacity (eg.: cloths were removed)
Definition at line 1105 of file environment.c.
References GameConstants::ENVIRO_HEATCOMFORT_WEIGHT_SUMMARY, GameConstants::ENVIRO_PLAYER_HEATBUFFER_CAPACITY_MIN, GameConstants::ENVIRO_PLAYER_HEATBUFFER_DECREASE, GameConstants::ENVIRO_PLAYER_HEATBUFFER_INCREASE, GameConstants::ENVIRO_PLAYER_HEATBUFFER_STAGE_RATELIMIT, GameConstants::ENVIRO_PLAYER_HEATBUFFER_TEMP_AFFECT, GameConstants::ENVIRO_PLAYER_HEATBUFFER_WATEREFFECT, GetApplicableHeatbuffer(), Math::InverseLerp(), Math::Lerp(), m_HasTemperatureSources, m_HeatBufferCapPrevious, m_HeatBufferTimer, m_HeatComfort, m_HeatComfortBehaviorCategory, m_IsInWater, m_UTSAverageTemperature, m_WaterLevel, PlayerStat(), HeatBufferMdfr::STAGE_THRESHOLDS, and PlayerConstants::THRESHOLD_HEAT_COMFORT_MINUS_WARNING.
Referenced by ProcessHeatBuffer(), and ProcessHeatComfort().
|
protected |
backward compatibility [<1.27]
Definition at line 1909 of file environment.c.
References m_EnvironmentSnapshot, m_TargetHeatComfort, and ProcessHeatBuffer().
|
protected |
Calculates and process player's heatcomfort related to defined body parts.
Heat Comfort Penalty
heatcomfort body parts penalties
Stomach temperature influence to heatcomfort
uses the raw targetHeatComfort data
Definition at line 973 of file environment.c.
References Math::AbsFloat(), BodyPartHeatProperties(), Math::Clamp(), GameConstants::ENVIRO_HEATCOMFORT_BACK_WEIGHT, GameConstants::ENVIRO_HEATCOMFORT_BODY_WEIGHT, GameConstants::ENVIRO_HEATCOMFORT_FEET_WEIGHT, GameConstants::ENVIRO_HEATCOMFORT_GLOVES_WEIGHT, GameConstants::ENVIRO_HEATCOMFORT_HEADGEAR_WEIGHT, GameConstants::ENVIRO_HEATCOMFORT_HIPS_WEIGHT, GameConstants::ENVIRO_HEATCOMFORT_LEGS_WEIGHT, GameConstants::ENVIRO_HEATCOMFORT_MASK_WEIGHT, GameConstants::ENVIRO_HEATCOMFORT_MAX_STEP_SIZE, GameConstants::ENVIRO_HEATCOMFORT_VEST_WEIGHT, GameConstants::ENVIRO_STOMACH_WEIGHT, EnvTempToCoef(), GetPlayerHeat(), GameConstants::ITEM_TEMPERATURE_NEUTRAL_ZONE_LOWER_LIMIT, GameConstants::ITEM_TEMPERATURE_NEUTRAL_ZONE_UPPER_LIMIT, m_AverageHeatComfortBuffer, m_EnvironmentSnapshot, m_EnvironmentTemperature, m_HeatComfort, NakedBodyPartHeatComfortPenalty(), ProcessHeatBuffer(), Math::Remap(), Math::Round(), and SetTargetHeatComfort().
Referenced by ProcessItemsHeat(), and Update().
Definition at line 1264 of file environment.c.
References Class::CastTo(), ItemBase::IsSelfAdjustingTemperature(), ProcessItemHierarchyRecursive(), and SetProcessedItemTemperature().
Referenced by ProcessItemHierarchyRecursive(), ProcessItemsInHandsTemperature(), and ProcessItemsTemperature().
|
protected |
Dry items in player possession.
Definition at line 825 of file environment.c.
References ApplyDrynessToItemEx(), vector::Distance(), GameConstants::ENVIRO_TICK_RATE, GetPosition(), m_HasTemperatureSources, EnvironmentDrynessData::m_TemperatureSourceDistance, EnvironmentDrynessData::m_UseTemperatureSources, m_UTemperatureSources, and Math::Max().
Referenced by Update().
|
protected |
Definition at line 1779 of file environment.c.
References ProcessHeatComfort().
|
protected |
Process temperature of item in character hands and cool/warm it to neutral temparature.
Definition at line 1250 of file environment.c.
References ItemBase::IsSelfAdjustingTemperature(), ProcessItemHierarchyRecursive(), and SetProcessedItemTemperature().
Referenced by Update().
Iterate through items in player posession (by given body parts) and cool/warm them to neutral temparature.
| pBodyPartIds | List of body parts to iterate through (see InventorySlots) |
go through all body parts we've defined for that zone (ex.: head, body, feet)
Definition at line 1219 of file environment.c.
References ItemBase::IsSelfAdjustingTemperature(), ProcessItemHierarchyRecursive(), and SetProcessedItemTemperature().
Referenced by Update().
Soak items at specific Slot ID(s).
| pSlotIds | Inventory Slot IDs to process |
Definition at line 697 of file environment.c.
References ApplyWetnessToItem(), and GameConstants::ENVIRO_TICK_RATE.
Referenced by ProcessWetnessByRain(), ProcessWetnessByWaterLevel(), and Update().
|
protected |
Processes registered UTSources and calculates resulting m_UTSAverageTemperature.
adds average of 2 most significat sources to buffer
Definition at line 1511 of file environment.c.
References CalcTemperatureFromTemperatureSource(), m_HasTemperatureSources, m_UTemperatureSources, m_UTSAverageTemperature, m_UTSAverageTemperatureBuffer, OnTemperatureSourcesEnter(), OnTemperatureSourcesLeft(), SetItemHeatingCoef(), and GameConstants::TEMP_COEF_INVENTORY.
Referenced by Update().
|
protected |
Definition at line 1785 of file environment.c.
References m_SlotIdsComplete, and ProcessItemsWetness().
|
protected |
Processes items wetness in player possession based on the current water level (the character is in).
| pWaterLevel | Water level height |
Definition at line 679 of file environment.c.
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().
|
protected |
Determines whether player is in cold area which restricts use of some actions (digging).
Definition at line 669 of file environment.c.
References GameConstants::COLD_AREA_TEMPERATURE_THRESHOLD, and m_WorldData.
Referenced by CollectAndSetEnvironmentData().
|
protected |
Definition at line 1900 of file environment.c.
References m_EnvironmentSnapshot, and m_TargetHeatComfort.
|
protected |
Definition at line 660 of file environment.c.
References GetEnvironmentTemperature(), m_EnvironmentTemperature, and m_IsTempSet.
Referenced by CollectAndSetEnvironmentData().
|
protected |
Definition at line 1089 of file environment.c.
References m_AverageHeatComfortBuffer, m_HeatComfort, m_HeatComfortBehaviorCategory, and SetTargetHeatComfort().
Referenced by Update().
|
protected |
Definition at line 1556 of file environment.c.
References m_ItemTemperatureCoef.
Referenced by ProcessTemperatureSources(), and SetProcessedItemTemperature().
swimming special behavior
Definition at line 1315 of file environment.c.
References GameConstants::ENVIRO_TICK_RATE, GameConstants::ITEM_TEMPERATURE_NEUTRAL_ZONE_MIDDLE, m_ItemTemperatureCoef, m_LiquidType, m_WorldData, SetItemHeatingCoef(), and GameConstants::TEMP_COEF_SWIMMING.
Referenced by ProcessItemHierarchyRecursive(), ProcessItemsInHandsTemperature(), and ProcessItemsTemperature().
|
protected |
Definition at line 1084 of file environment.c.
References m_TargetHeatComfort.
Referenced by ProcessHeatComfort(), and SetHeatcomfortDirectly().
|
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;
Definition at line 208 of file environment.c.
References 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_RoofCheckTimer, m_SlotIdsComplete, m_Time, m_WaterLevel, m_WetDryTick, ProcessHeatComfort(), ProcessItemsDryness(), ProcessItemsInHandsTemperature(), ProcessItemsTemperature(), ProcessItemsWetness(), ProcessTemperatureSources(), ProcessWetnessByWaterLevel(), SetHeatcomfortDirectly(), SNOWFALL_WIND_COMBINED_THRESHOLD, and GameConstants::STATE_WET.
backward compatibility [<1.28]
Definition at line 1918 of file environment.c.
References GameConstants::ENVIRO_WIND_CHILL_LIMIT, GameConstants::ENVIRO_WIND_EFFECT_SLOPE, m_Wind, and m_WorldData.
Referenced by GetEnvironmentTemperature().
|
protected |
Definition at line 91 of file environment.c.
Referenced by Init(), ProcessHeatComfort(), and SetHeatcomfortDirectly().
Definition at line 82 of file environment.c.
| enum EEnvironmentHeatcomfortBehaviorCategory m_ClothingHeatComfort |
|
protected |
Definition at line 57 of file environment.c.
Referenced by CollectAndSetEnvironmentData(), GetDebugMessage(), and GetWetDelta().
|
protected |
Definition at line 56 of file environment.c.
Referenced by CollectAndSetEnvironmentData(), GetDayOrNight(), and GetDebugMessage().
|
protected |
Definition at line 1769 of file environment.c.
Referenced by Init(), ProcessHeatBuffer(), ProcessHeatComfort(), and SetEnvironmentSnapshotData().
|
protected |
Definition at line 58 of file environment.c.
Referenced by GetDebugMessage(), GetTemperature(), Init(), ProcessHeatComfort(), and SetEnvironmentTemperature().
Definition at line 83 of file environment.c.
|
protected |
Definition at line 55 of file environment.c.
Referenced by CollectAndSetEnvironmentData(), GetDebugMessage(), and GetWetDelta().
|
protected |
Definition at line 87 of file environment.c.
Referenced by ProcessHeatBuffer(), ProcessItemsDryness(), and ProcessTemperatureSources().
Definition at line 81 of file environment.c.
|
protected |
reused as state toggle
Definition at line 74 of file environment.c.
Referenced by ProcessHeatBuffer().
|
protected |
Definition at line 73 of file environment.c.
Referenced by Init(), and ProcessHeatBuffer().
|
protected |
Definition at line 48 of file environment.c.
Referenced by GetDebugMessage(), Init(), ProcessHeatBuffer(), ProcessHeatComfort(), and SetHeatcomfortDirectly().
|
protected |
Definition at line 93 of file environment.c.
Referenced by DetermineHeatcomfortBehavior(), Init(), ProcessHeatBuffer(), and SetHeatcomfortDirectly().
|
protected |
DEPRECATED.
Definition at line 1767 of file environment.c.
|
private |
Definition at line 95 of file environment.c.
|
protected |
Definition at line 70 of file environment.c.
Referenced by CheckWaterContact(), Init(), IsWaterContact(), and ProcessHeatBuffer().
|
protected |
Definition at line 71 of file environment.c.
Referenced by IsTemperatureSet(), and SetEnvironmentTemperature().
|
protected |
Definition at line 68 of file environment.c.
Referenced by CheckUnderRoof(), GetDebugMessage(), Init(), and IsUnderRoof().
|
private |
Definition at line 69 of file environment.c.
Referenced by CheckUnderRoof(), GetEnvironmentTemperature(), and IsUnderRoofBuilding().
|
protected |
Definition at line 39 of file environment.c.
Referenced by ApplyDrynessToItemEx(), ApplyWetnessToItem(), and Update().
|
protected |
Definition at line 64 of file environment.c.
Referenced by SetItemHeatingCoef(), and SetProcessedItemTemperature().
|
protected |
Definition at line 61 of file environment.c.
Referenced by CheckWaterContact(), GetEnvironmentTemperature(), and SetProcessedItemTemperature().
|
protected |
Definition at line 43 of file environment.c.
|
protected |
Definition at line 47 of file environment.c.
Referenced by CollectAndSetPlayerData(), and GetWetDelta().
|
protected |
Definition at line 44 of file environment.c.
Referenced by CollectAndSetPlayerData(), and GetTemperatureHeightCorrection().
|
protected |
Definition at line 45 of file environment.c.
Referenced by CollectAndSetPlayerData(), GetPlayerHeat(), and Init().
|
protected |
Definition at line 46 of file environment.c.
|
protected |
target value of heatcomfort (non-buffered)
Definition at line 52 of file environment.c.
Referenced by CollectAndSetEnvironmentData(), GetDebugMessage(), GetWetDelta(), IsRaining(), and NakedBodyPartHeatComfortPenalty().
|
protected |
keeps wetness of most wet item in player's possesion
Definition at line 40 of file environment.c.
Referenced by GetNextRoofCheck(), Init(), and Update().
Definition at line 78 of file environment.c.
Referenced by Init(), and ProcessWetnessByWaterLevel().
Definition at line 76 of file environment.c.
Referenced by Init(), ProcessWetnessByRain(), ProcessWetnessByWaterLevel(), and Update().
Definition at line 79 of file environment.c.
Referenced by Init(), and ProcessWetnessByWaterLevel().
Definition at line 77 of file environment.c.
Referenced by Init(), and ProcessWetnessByWaterLevel().
|
protected |
Definition at line 53 of file environment.c.
Referenced by CollectAndSetEnvironmentData(), GetDebugMessage(), GetWetDelta(), IsSnowing(), and NakedBodyPartHeatComfortPenalty().
|
protected |
Definition at line 60 of file environment.c.
Referenced by CheckWaterContact(), GetWindModifierPerSurface(), and Init().
| float m_TargetHeatComfort |
player's heatcomfort (buffered, stored in player stats)
Definition at line 13 of file environment.c.
Referenced by GetTargetHeatComfort(), ProcessHeatBuffer(), SetEnvironmentSnapshotData(), and SetTargetHeatComfort().
|
protected |
Definition at line 59 of file environment.c.
|
protected |
Definition at line 89 of file environment.c.
Referenced by GatherTemperatureSources(), Init(), ProcessItemsDryness(), and ProcessTemperatureSources().
|
protected |
Definition at line 88 of file environment.c.
Referenced by GetEnvironmentTemperature(), GetUniversalSourcesTemperageAverage(), Init(), ProcessHeatBuffer(), and ProcessTemperatureSources().
|
protected |
Definition at line 90 of file environment.c.
Referenced by Init(), and ProcessTemperatureSources().
|
protected |
Definition at line 67 of file environment.c.
Referenced by GetDebugMessage(), GetWaterLevel(), GetWetDelta(), Init(), ProcessHeatBuffer(), and Update().
|
protected |
Definition at line 38 of file environment.c.
|
protected |
Definition at line 54 of file environment.c.
Referenced by CollectAndSetEnvironmentData(), GetDebugMessage(), GetWetDelta(), and WindEffectTemperatureValue().
|
protected |
Definition at line 1768 of file environment.c.
|
protected |
Definition at line 85 of file environment.c.
Referenced by GetDebugMessage(), GetEnvironmentTemperature(), GetTemperatureHeightCorrection(), Init(), MissionBase::OnUpdate(), SetAreaGenericColdness(), SetProcessedItemTemperature(), and WindEffectTemperatureValue().
| 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().
|
protected |
Definition at line 30 of file environment.c.
Referenced by GetWetDelta(), and IsSnowing().
|
protected |
Definition at line 31 of file environment.c.
Referenced by GetWetDelta(), and Update().
|
protected |
Definition at line 33 of file environment.c.
Referenced by CheckWaterContact(), GetWetDelta(), and ProcessWetnessByWaterLevel().
|
protected |
Definition at line 35 of file environment.c.
Referenced by GetWetDelta(), and ProcessWetnessByWaterLevel().
|
protected |
Definition at line 34 of file environment.c.
Referenced by CheckWaterContact(), GetWetDelta(), and ProcessWetnessByWaterLevel().
|
protected |
Definition at line 36 of file environment.c.
Referenced by GetDebugMessage(), GetWaterLevel(), GetWetDelta(), and ProcessWetnessByWaterLevel().