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

◆ GetWetDelta()

float GetWetDelta ( )
protected

Calculates soaking/drying delta based on character's location and weather.

Возвращает
Resulting wet delta modifier

player is getting wet by movement/swimming in water (+differentiate wetDelta by water level)

player is drying

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

564 {
565 float wetDelta = 0;
566 if ( IsWaterContact() )
567 {
570 {
571 wetDelta = 1;
572 }
574 {
575 wetDelta = 0.66;
576 }
578 {
579 wetDelta = 0.66;
580 }
582 {
583 wetDelta = 0.33;
584 }
585 }
586 else if (!IsInsideBuilding() && !IsUnderRoof() && !IsChildOfType({Car}))
587 {
588 if (IsRaining())
590
591 if (IsSnowing() && MiscGameplayFunctions.GetCombinedSnowfallWindValue() > SNOWFALL_WIND_COMBINED_THRESHOLD)
593 }
594 else
595 {
597 float tempEffect = Math.Max(m_PlayerHeat + GetEnvironmentTemperature(), 1.0);
598
599 float weatherEffect = ((1 - (m_Fog * GameConstants.ENVIRO_FOG_DRY_EFFECT))) * (1 - (m_Clouds * GameConstants.ENVIRO_CLOUD_DRY_EFFECT));
600 if (weatherEffect <= 0)
601 {
602 weatherEffect = 1.0;
603 }
604
605 wetDelta = -(GameConstants.ENVIRO_DRY_INCREMENT * weatherEffect * tempEffect);
606 if (!IsInsideBuilding())
607 {
608 wetDelta *= 1 + (GameConstants.ENVIRO_WIND_EFFECT * m_Wind);
609 }
610 }
611
612 return wetDelta;
613 }
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
bool IsInsideBuilding()
Is character inside building? (periodically checked - GameConstants.ENVIRO_TICK_ROOF_RC_CHECK).
Определения Environment.c:313
const float SNOWFALL_LIMIT_LOW
Определения Environment.c:30
bool IsUnderRoof()
Is character under roof (periodically checked - GameConstants.ENVIRO_TICK_ROOF_RC_CHECK)....
Определения Environment.c:305
const float WATER_LEVEL_MID
Определения Environment.c:34
float m_Rain
target value of heatcomfort (non-buffered)
Определения Environment.c:52
float m_Snowfall
Определения Environment.c:53
const float SNOWFALL_WIND_COMBINED_THRESHOLD
Определения Environment.c:31
float m_Wind
Определения Environment.c:54
float m_PlayerHeat
Определения Environment.c:47
const float WATER_LEVEL_LOW
Определения Environment.c:35
const float WATER_LEVEL_NONE
Определения Environment.c:36
const float WATER_LEVEL_HIGH
Определения Environment.c:33
bool IsRaining()
Rain phenomenon actual value > RAIN_LIMIT_LOW.
Определения Environment.c:351
float GetEnvironmentTemperature()
Calculations of temperarute for different situations.
Определения Environment.c:517
float m_WaterLevel
Определения Environment.c:67
bool IsSnowing()
Snowfall phenomenon actual value > SNOWFALL_LIMIT_LOW.
Определения Environment.c:359
float m_Fog
Определения Environment.c:55
float m_Clouds
Определения Environment.c:57
Определения CarScript.c:162
Определения EnMath.c:7
const float ENVIRO_FOG_DRY_EFFECT
how many % of ENVIRO_SUN_INCREMENT is reduced by cloudy sky
Определения 3_Game/constants.c:728
const float ENVIRO_DRY_INCREMENT
amount of wetness added to items wet value each tick if is raining
Определения 3_Game/constants.c:724
const float ENVIRO_CLOUD_DRY_EFFECT
how much is the generic temp effect increased when player is next to a fireplace
Определения 3_Game/constants.c:727
const float ENVIRO_WET_INCREMENT
in secs. how often we should check if player is under the roof (raycast)
Определения 3_Game/constants.c:723
const float ENVIRO_TICKS_TO_WETNESS_CALCULATION
in secs. how often should enviro effet process
Определения 3_Game/constants.c:721
const float ENVIRO_WIND_EFFECT
windchill effect on base temperature
Определения 3_Game/constants.c:736
const float ENVIRO_SNOW_WET_COEF
Above this value, the wind effect increases the modified temperature.
Определения 3_Game/constants.c:797
static proto float Max(float x, float y)
Returns bigger of two given values.

Перекрестные ссылки 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 и WATER_LEVEL_NONE.

Используется в ApplyWetnessToItem() и GetDebugMessage().