DayZ 1.24
|
Private Member Functions | |
bool | IsUnderRoofBuilding () |
void | LogDryWetProcess (string message, bool indented=false) |
Private Attributes | |
const float | RAIN_LIMIT_LOW = 0.05 |
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 |
bool | m_IsUnderRoofBuilding |
Definition at line 1 of file Environment.c.
|
inlineprotected |
Definition at line 631 of file Environment.c.
References ApplyDrynessToItemEx().
|
inlineprotected |
adds wetness to item inside parent item containing liquid
adds wetness to item inside wet parent item
Definition at line 637 of file Environment.c.
References ApplyDrynessToItemEx(), Class::CastTo(), GameConstants::ENVIRO_TICK_RATE, LogDryWetProcess(), m_ItemsWetnessMax, m_Player, GameConstants::STATE_DAMP, GameConstants::STATE_SOAKING_WET, and GameConstants::TEMPERATURE_RATE_COOLING_PLAYER.
Referenced by ApplyDrynessToItem(), ApplyDrynessToItemEx(), and ProcessItemsDryness().
Definition at line 549 of file Environment.c.
References ApplyWetnessToItem(), Class::CastTo(), GameConstants::ENVIRO_TICK_RATE, GetWetDelta(), LogDryWetProcess(), m_ItemsWetnessMax, m_Player, GameConstants::STATE_SOAKING_WET, and GameConstants::TEMPERATURE_RATE_COOLING_PLAYER.
Referenced by ApplyWetnessToItem(), and ProcessItemsWetness().
|
inlineprotected |
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 806 of file Environment.c.
References Class::CastTo(), GameConstants::ENVIRO_HEATISOLATION_BACK_WEIGHT, GameConstants::ENVIRO_HEATISOLATION_VEST_WEIGHT, and m_Player.
Referenced by ProcessItemsHeat().
|
inlineprotected |
heat transfer through air to player (env temperature)
dist factor minimum should be at 0
Definition at line 928 of file Environment.c.
References vector::Distance(), m_Player, and Math::Max().
Referenced by ProcessTemperatureSources().
|
inlineprotected |
Checks whether Player is sheltered.
Definition at line 256 of file Environment.c.
References IsInsideVehicle(), m_IsUnderRoof, m_IsUnderRoofBuilding, m_Player, and DayZPhysics::RayCastBullet().
Referenced by Update().
no valid surface under character
sync info about water contact to player
update active surface
Definition at line 278 of file Environment.c.
References g_Game, IsUnderRoofBuilding(), LIQUID_RIVERWATER, LIQUID_WATER, m_IsInWater, m_Player, m_SurfaceType, WATER_LEVEL_HIGH, and WATER_LEVEL_MID.
Referenced by Update().
|
inlineprotected |
Definition at line 429 of file Environment.c.
References g_Game, m_Clouds, m_DayOrNight, m_Fog, m_Rain, m_Wind, m_WindAverageBuffer, and SetEnvironmentTemperature().
Referenced by Update().
|
inlineprotected |
Definition at line 416 of file Environment.c.
References GetPlayerHeat(), m_Player, m_PlayerHeat, m_PlayerHeightPos, and m_PlayerSpeed.
Referenced by Update().
Definition at line 794 of file Environment.c.
References GameConstants::ENVIRO_HIGH_TEMP_LIMIT, GameConstants::ENVIRO_LOW_TEMP_LIMIT, GameConstants::ENVIRO_PLAYER_COMFORT_TEMP, and GameConstants::ENVIRO_TEMP_EFFECT_ON_PLAYER.
Referenced by ProcessItemsHeat().
|
inlineprotected |
next temp source is too far
Definition at line 870 of file Environment.c.
References vector::DistanceSq(), GameConstants::ENVIRO_TEMP_SOURCES_LOOKUP_RADIUS, GetGame(), m_Player, m_UTemperatureSources, and Math::SqrFloat().
Referenced by Update().
|
inlineprotected |
Definition at line 1051 of file Environment.c.
References m_DayOrNight.
|
inlineprotected |
debug
Definition at line 1014 of file Environment.c.
References g_Game, GetNextRoofCheck(), GetTemperatureHeightCorrection(), GetWetDelta(), GetWindModifierPerSurface(), IsInsideBuilding(), IsWaterContact(), m_Clouds, m_DayOrNight, m_EnvironmentTemperature, m_Fog, m_HeatComfort, m_IsUnderRoof, m_Player, m_Rain, m_WaterLevel, m_Wind, bool::ToString(), float::ToString(), and WATER_LEVEL_NONE.
|
inlineprotected |
Definition at line 344 of file Environment.c.
References Math::AbsFloat(), GameConstants::ENVIRO_CLOUDS_TEMP_EFFECT, GameConstants::ENVIRO_FOG_TEMP_EFFECT, GameConstants::ENVIRO_TEMPERATURE_INSIDE_COEF, GameConstants::ENVIRO_TEMPERATURE_INSIDE_VEHICLE_COEF, GameConstants::ENVIRO_TEMPERATURE_UNDERROOF_COEF, GameConstants::ENVIRO_TEMPERATURE_WIND_COEF, GameConstants::ENVIRO_WATER_TEMPERATURE_COEF, g_Game, GetTemperatureHeightCorrection(), GetWindModifierPerSurface(), IsInsideBuilding(), IsInsideVehicle(), IsUnderRoof(), IsWaterContact(), m_Clouds, m_Fog, m_IsUnderRoofBuilding, m_UTSAverageTemperature, and m_Wind.
Referenced by GetWetDelta(), and SetEnvironmentTemperature().
|
inlineprotected |
Definition at line 1038 of file Environment.c.
References GameConstants::ENVIRO_TICK_ROOF_RC_CHECK, and m_RoofCheckTimer.
Referenced by GetDebugMessage().
|
inlineprotected |
Returns heat player generated based on player's movement speed (for now)
Definition at line 219 of file Environment.c.
References GameConstants::ENVIRO_DEFAULT_ENTITY_HEAT, m_PlayerSpeed, and Math::Max().
Referenced by CollectAndSetPlayerData(), and ProcessItemsHeat().
|
inlineprotected |
Definition at line 338 of file Environment.c.
References m_EnvironmentTemperature.
|
inlineprotected |
Definition at line 324 of file Environment.c.
References GameConstants::ENVIRO_TEMPERATURE_HEIGHT_REDUCTION, m_PlayerHeightPos, and Math::Max().
Referenced by GetDebugMessage(), and GetEnvironmentTemperature().
|
inlineprotected |
Definition at line 923 of file Environment.c.
References m_UTSAverageTemperature.
|
inlineprotected |
Definition at line 1043 of file Environment.c.
References IsWaterContact(), m_WaterLevel, and WATER_LEVEL_NONE.
|
inlineprotected |
player is getting wet by movement/swimming in water (+differentiate wetDelta by water level)
player is getting wet from rain
player is drying
Definition at line 377 of file Environment.c.
References GameConstants::ENVIRO_CLOUD_DRY_EFFECT, GameConstants::ENVIRO_DRY_INCREMENT, GameConstants::ENVIRO_FOG_DRY_EFFECT, GameConstants::ENVIRO_TICKS_TO_WETNESS_CALCULATION, GameConstants::ENVIRO_WET_INCREMENT, GameConstants::ENVIRO_WIND_EFFECT, GetEnvironmentTemperature(), IsInsideBuilding(), IsInsideVehicle(), IsRaining(), IsUnderRoof(), IsWaterContact(), m_Clouds, m_Fog, m_PlayerHeat, m_Rain, m_WaterLevel, m_Wind, Math::Max(), WATER_LEVEL_HIGH, WATER_LEVEL_LOW, WATER_LEVEL_MID, and WATER_LEVEL_NONE.
Referenced by ApplyWetnessToItem(), and GetDebugMessage().
|
inlineprotected |
Definition at line 330 of file Environment.c.
References g_Game, IsUnderRoofBuilding(), and m_SurfaceType.
Referenced by GetDebugMessage(), and GetEnvironmentTemperature().
|
inlineprotected |
whole body slots
upper body part slots
bottom body part slots
lower body part slots
heat comfort related slots
Definition at line 69 of file Environment.c.
References m_BodyParts, m_FeetParts, m_HeadParts, m_HeatBufferTimer, m_HeatComfort, m_IsInWater, m_IsUnderRoof, m_Player, 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_WindAverageBuffer.
|
inlineprotected |
Definition at line 235 of file Environment.c.
References m_Player.
Referenced by GetDebugMessage(), GetEnvironmentTemperature(), GetWetDelta(), and Update().
|
inlineprotected |
Definition at line 240 of file Environment.c.
References m_Player.
Referenced by CheckUnderRoof(), GetEnvironmentTemperature(), GetWetDelta(), and Update().
|
inlineprotected |
Definition at line 250 of file Environment.c.
References m_Rain, and RAIN_LIMIT_LOW.
Referenced by GetWetDelta(), and Update().
|
inlineprotected |
|
inlineprotected |
Definition at line 225 of file Environment.c.
References m_IsUnderRoof.
Referenced by GetEnvironmentTemperature(), GetWetDelta(), and Update().
|
inlineprivate |
Definition at line 245 of file Environment.c.
References m_IsUnderRoofBuilding.
Referenced by CheckWaterContact(), and GetWindModifierPerSurface().
|
inlineprotected |
Definition at line 230 of file Environment.c.
References m_IsInWater.
Referenced by GetDebugMessage(), GetEnvironmentTemperature(), GetWaterLevel(), GetWetDelta(), and Update().
Definition at line 1056 of file Environment.c.
References Debug::Log().
Referenced by ApplyDrynessToItemEx(), ApplyWetnessToItem(), ProcessItemsDryness(), and ProcessItemsWetness().
|
inlineprotected |
Definition at line 513 of file Environment.c.
References ApplyDrynessToItemEx(), vector::Distance(), GameConstants::ENVIRO_TICK_RATE, GetPosition, LogDryWetProcess(), m_HasTemperatureSources, m_Player, m_UTemperatureSources, and Math::Max().
Referenced by Update().
|
inlineprotected |
Calculates and process temperature of items.
Heat Comfort
Heat (from items);
Definition at line 734 of file Environment.c.
References BodyPartHeatProperties(), Math::Clamp(), GameConstants::ENVIRO_HEATCOMFORT_BODYPARTS_WEIGHT, GameConstants::ENVIRO_HEATCOMFORT_FEETPARTS_WEIGHT, GameConstants::ENVIRO_HEATCOMFORT_HEADPARTS_WEIGHT, GameConstants::ENVIRO_ITEM_HEAT_TRANSFER_COEF, GameConstants::ENVIRO_PLAYER_HEATBUFFER_DECREASE, GameConstants::ENVIRO_PLAYER_HEATBUFFER_INCREASE, GameConstants::ENVIRO_PLAYER_HEATBUFFER_TICK, EnvTempToCoef(), GetPlayerHeat(), m_BodyParts, m_EnvironmentTemperature, m_FeetParts, m_HeadParts, m_HeatBufferTimer, m_HeatComfort, m_Player, m_UTSAverageTemperature, Math::Min(), PlayerConstants::THRESHOLD_HEAT_COMFORT_MINUS_WARNING, and PlayerConstants::THRESHOLD_HEAT_COMFORT_PLUS_WARNING.
Referenced by Update().
Definition at line 478 of file Environment.c.
References ApplyWetnessToItem(), GameConstants::ENVIRO_TICK_RATE, LogDryWetProcess(), and m_Player.
Referenced by ProcessWetnessByRain(), and ProcessWetnessByWaterLevel().
|
inlineprotected |
adds average of 2 most significat sources to buffer
Definition at line 894 of file Environment.c.
References CalcTemperatureFromTemperatureSource(), m_HasTemperatureSources, m_UTemperatureSources, m_UTSAverageTemperature, and m_UTSAverageTemperatureBuffer.
Referenced by Update().
|
inlineprotected |
Definition at line 447 of file Environment.c.
References m_SlotIdsComplete, and ProcessItemsWetness().
Referenced by Update().
complete
upper part
bottom part
feet
Definition at line 452 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().
|
inlineprotected |
Definition at line 441 of file Environment.c.
References GetEnvironmentTemperature(), m_EnvironmentTemperature, and m_IsTempSet.
Referenced by CollectAndSetEnvironmentData().
check if player is under roof (only if the Building check is false)
Updates data
Process temperature
Process item wetness/dryness
setting of wetness/dryiness of player
reset item wetness counter;
Definition at line 156 of file Environment.c.
References CheckUnderRoof(), CheckWaterContact(), CollectAndSetEnvironmentData(), CollectAndSetPlayerData(), GameConstants::ENVIRO_TICK_RATE, GameConstants::ENVIRO_TICK_ROOF_RC_CHECK, GameConstants::ENVIRO_TICKS_TO_WETNESS_CALCULATION, GatherTemperatureSources(), IsInsideBuilding(), IsInsideVehicle(), IsRaining(), IsUnderRoof(), IsWaterContact(), m_ItemsWetnessMax, m_Player, m_RoofCheckTimer, m_Time, m_WaterLevel, m_WetDryTick, ProcessItemsDryness(), ProcessItemsHeat(), ProcessTemperatureSources(), ProcessWetnessByRain(), ProcessWetnessByWaterLevel(), and GameConstants::STATE_WET.
Definition at line 48 of file Environment.c.
Referenced by Init(), and ProcessItemsHeat().
|
protected |
Definition at line 27 of file Environment.c.
Referenced by CollectAndSetEnvironmentData(), GetDebugMessage(), GetEnvironmentTemperature(), and GetWetDelta().
|
protected |
Definition at line 26 of file Environment.c.
Referenced by CollectAndSetEnvironmentData(), GetDayOrNight(), and GetDebugMessage().
|
protected |
Definition at line 28 of file Environment.c.
Referenced by GetDebugMessage(), GetTemperature(), ProcessItemsHeat(), and SetEnvironmentTemperature().
Definition at line 49 of file Environment.c.
Referenced by Init(), and ProcessItemsHeat().
|
protected |
Definition at line 25 of file Environment.c.
Referenced by CollectAndSetEnvironmentData(), GetDebugMessage(), GetEnvironmentTemperature(), and GetWetDelta().
|
protected |
Definition at line 53 of file Environment.c.
Referenced by ProcessItemsDryness(), and ProcessTemperatureSources().
Definition at line 47 of file Environment.c.
Referenced by Init(), and ProcessItemsHeat().
|
protected |
DEPRECATED.
Definition at line 40 of file Environment.c.
Referenced by Init(), and ProcessItemsHeat().
|
protected |
Definition at line 20 of file Environment.c.
Referenced by GetDebugMessage(), Init(), and ProcessItemsHeat().
|
protected |
Definition at line 39 of file Environment.c.
|
protected |
Definition at line 36 of file Environment.c.
Referenced by CheckWaterContact(), Init(), and IsWaterContact().
|
protected |
Definition at line 37 of file Environment.c.
Referenced by IsTemperatureSet(), and SetEnvironmentTemperature().
|
protected |
Definition at line 34 of file Environment.c.
Referenced by CheckUnderRoof(), GetDebugMessage(), Init(), and IsUnderRoof().
|
private |
Definition at line 35 of file Environment.c.
Referenced by CheckUnderRoof(), GetEnvironmentTemperature(), and IsUnderRoofBuilding().
|
protected |
Definition at line 11 of file Environment.c.
Referenced by ApplyDrynessToItemEx(), ApplyWetnessToItem(), and Update().
|
protected |
Definition at line 15 of file Environment.c.
Referenced by ApplyDrynessToItemEx(), ApplyWetnessToItem(), BodyPartHeatProperties(), CalcTemperatureFromTemperatureSource(), CheckUnderRoof(), CheckWaterContact(), CollectAndSetPlayerData(), GatherTemperatureSources(), GetDebugMessage(), Init(), IsInsideBuilding(), IsInsideVehicle(), ProcessItemsDryness(), ProcessItemsHeat(), ProcessItemsWetness(), and Update().
|
protected |
Definition at line 19 of file Environment.c.
Referenced by CollectAndSetPlayerData(), and GetWetDelta().
|
protected |
Definition at line 16 of file Environment.c.
Referenced by CollectAndSetPlayerData(), and GetTemperatureHeightCorrection().
|
protected |
Definition at line 17 of file Environment.c.
Referenced by CollectAndSetPlayerData(), GetPlayerHeat(), and Init().
|
protected |
Definition at line 18 of file Environment.c.
|
protected |
Definition at line 23 of file Environment.c.
Referenced by CollectAndSetEnvironmentData(), GetDebugMessage(), GetWetDelta(), and IsRaining().
|
protected |
keeps wetness of most wet item in player's possesion
Definition at line 12 of file Environment.c.
Referenced by GetNextRoofCheck(), Init(), and Update().
Definition at line 44 of file Environment.c.
Referenced by Init(), and ProcessWetnessByWaterLevel().
Definition at line 42 of file Environment.c.
Referenced by Init(), ProcessWetnessByRain(), and ProcessWetnessByWaterLevel().
Definition at line 45 of file Environment.c.
Referenced by Init(), and ProcessWetnessByWaterLevel().
Definition at line 43 of file Environment.c.
Referenced by Init(), and ProcessWetnessByWaterLevel().
|
protected |
Definition at line 30 of file Environment.c.
Referenced by CheckWaterContact(), GetWindModifierPerSurface(), and Init().
|
protected |
Definition at line 29 of file Environment.c.
Referenced by Update().
|
protected |
Definition at line 55 of file Environment.c.
Referenced by GatherTemperatureSources(), Init(), ProcessItemsDryness(), and ProcessTemperatureSources().
|
protected |
Definition at line 54 of file Environment.c.
Referenced by GetEnvironmentTemperature(), GetUniversalSourcesTemperageAverage(), Init(), ProcessItemsHeat(), and ProcessTemperatureSources().
Definition at line 56 of file Environment.c.
Referenced by Init(), and ProcessTemperatureSources().
|
protected |
Definition at line 33 of file Environment.c.
Referenced by GetDebugMessage(), GetWaterLevel(), GetWetDelta(), Init(), and Update().
|
protected |
Definition at line 10 of file Environment.c.
|
protected |
Definition at line 24 of file Environment.c.
Referenced by CollectAndSetEnvironmentData(), GetDebugMessage(), GetEnvironmentTemperature(), and GetWetDelta().
Definition at line 51 of file Environment.c.
Referenced by CollectAndSetEnvironmentData(), and Init().
Definition at line 3 of file Environment.c.
Referenced by IsRaining().
Definition at line 5 of file Environment.c.
Referenced by CheckWaterContact(), GetWetDelta(), and ProcessWetnessByWaterLevel().
Definition at line 7 of file Environment.c.
Referenced by GetWetDelta(), and ProcessWetnessByWaterLevel().
Definition at line 6 of file Environment.c.
Referenced by CheckWaterContact(), GetWetDelta(), and ProcessWetnessByWaterLevel().
Definition at line 8 of file Environment.c.
Referenced by GetDebugMessage(), GetWaterLevel(), GetWetDelta(), and ProcessWetnessByWaterLevel().