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

Защищенные данные

bool m_missionWeather
 

Закрытые члены

void Weather ()
 
void ~Weather ()
 
proto native float GetTime ()
 Returns actual time from start of a server (how many seconds elapsed from server start).
 
proto native Overcast GetOvercast ()
 Returns an overcast phenomenon object.
 
proto native Fog GetFog ()
 Returns a fog phenomenon object.
 
proto native Rain GetRain ()
 Returns a rain phenomenon object.
 
proto native Snowfall GetSnowfall ()
 Returns a snowfall phenomenon object.
 
proto native WindDirection GetWindDirection ()
 Returns a wind direction phenomenon object.
 
proto native WindMagnitude GetWindMagnitude ()
 Returns a wind magnitude phenomenon object.
 
proto native void SetStorm (float density, float threshold, float timeOut)
 Sets the thunderstorm properties.
 
proto native void SuppressLightningSimulation (bool state)
 enables/disables thunderbolt simulation on client (together with sounds)
 
proto native vector GetWind ()
 Returns wind vector (direction and speed as length of the vector).
 
proto native void SetWind (vector wind)
 Sets the wind vector (direction and speed as length of the vector).

 
proto native float GetWindSpeed ()
 Returns actual wind speed in metre per second.
 
proto native void SetWindSpeed (float speed)
 Sets the actual wind speed in metre per second.
 
proto native float GetWindMaximumSpeed ()
 Returns maximal wind speed in metre per second.
 
proto native void SetWindMaximumSpeed (float maxSpeed)
 Sets the maximal wind speed in metre per second. Equivalent to setting WindMagnitude phenomenon(s) value upper limit.
 
proto void GetWindFunctionParams (out float fnMin, out float fnMax, out float fnSpeed)
 Reads function parameters that controls the wind behaviour (change in time).
 
proto native void SetWindFunctionParams (float fnMin, float fnMax, float fnSpeed)
 Sets function parameters that controls the wind behaviour (change in time).
 
proto native void SetRainThresholds (float tMin, float tMax, float tTime)
 Sets overcast threshold values for rain phenomena.
 
proto native void SetSnowfallThresholds (float tMin, float tMax, float tTime)
 Sets overcast threshold values for snowfall phenomena.
 
proto native void SetSnowflakeScale (float scale)
 Sets the overall scale of snowflakes during snowfall phenomenon. This value is not synchronized and should be set by deterministic means.
 
proto native float GetSnowflakeScale ()
 Returns the overall scale of snowflakes during snowfall phenomenon.
 
proto native bool IsDynVolFogEnabled ()
 Dynamic volumetric fog only takes effect if enabled in the world config.
 
proto native void SetDynVolFogDistanceDensity (float value, float time=0)
 Sets the dynamic volumetric fog distance density. Only takes effect if dynamic volumetric fog is enabled.
 
proto native float GetDynVolFogDistanceDensity ()
 Returns the current 'dynamic' volumetric fog distance density.
 
proto native void SetDynVolFogHeightDensity (float value, float time=0)
 Sets the dynamic volumetric fog height density. Only takes effect if dynamic volumetric fog is enabled.
 
proto native float GetDynVolFogHeightDensity ()
 Returns the current 'dynamic' volumetric fog height density.
 
proto native void SetDynVolFogHeightBias (float value, float time=0)
 Sets the 'dynamic' volumetric height bias. Takes effect only if enabled via world config.
 
proto native float GetDynVolFogHeightBias ()
 Returns the current 'dynamic' volumetric fog height bias in meters.
 
void MissionWeather (bool use)
 
bool GetMissionWeather ()
 
float GetNoiseReductionByWeather ()
 

Закрытые статические члены

static proto float WindDirectionToAngle (vector dir)
 Returns the xz angle of the provided wind vector.
 
static proto vector AngleToWindDirection (float angle)
 Returns wind direction from the provided wind angle.
 

Подробное описание

Weather controller

Конструктор(ы)

◆ Weather()

void Weather ( )
inlineprivate
169 {
170 m_missionWeather = false;
171 }
bool m_missionWeather
Definition Weather.c:166

Перекрестные ссылки m_missionWeather.

◆ ~Weather()

void ~Weather ( )
inlineprivate
173{}

Методы

◆ AngleToWindDirection()

static proto vector AngleToWindDirection ( float angle)
staticprivate

Returns wind direction from the provided wind angle.

Аргументы
angleWind angle in the -PI, +PI interval.
Возвращает
Wind direction vector.

◆ GetDynVolFogDistanceDensity()

proto native float GetDynVolFogDistanceDensity ( )
private

Returns the current 'dynamic' volumetric fog distance density.

◆ GetDynVolFogHeightBias()

proto native float GetDynVolFogHeightBias ( )
private

Returns the current 'dynamic' volumetric fog height bias in meters.

Используется в WorldData::CalculateVolFog(), EnochData::CalculateVolFog() и WorldData::WeatherOnBeforeChange().

◆ GetDynVolFogHeightDensity()

proto native float GetDynVolFogHeightDensity ( )
private

Returns the current 'dynamic' volumetric fog height density.

◆ GetFog()

◆ GetMissionWeather()

bool GetMissionWeather ( )
inlineprivate
385 {
386 return m_missionWeather;
387 }

Перекрестные ссылки m_missionWeather.

◆ GetNoiseReductionByWeather()

float GetNoiseReductionByWeather ( )
inlineprivate
391 {
394
395 if (rainReduction == 0 && snowfallReduction == 0)
396 return 1;
397
398 if (rainReduction > snowfallReduction) // combined phenomenons dont need to have multiplicative effects
399 return 1 - rainReduction;
400 else
401 return 1 - snowfallReduction;
402 }
Definition constants.c:638
Definition EntityAI.c:95
proto native Snowfall GetSnowfall()
Returns a snowfall phenomenon object.
proto native Rain GetRain()
Returns a rain phenomenon object.
static float SNOWFALL_NOISE_REDUCTION_WEIGHT
Definition constants.c:1034
static float RAIN_NOISE_REDUCTION_WEIGHT
Definition constants.c:1033

Перекрестные ссылки GetRain(), GetSnowfall(), GameConstants::RAIN_NOISE_REDUCTION_WEIGHT и GameConstants::SNOWFALL_NOISE_REDUCTION_WEIGHT.

◆ GetOvercast()

◆ GetRain()

◆ GetSnowfall()

proto native Snowfall GetSnowfall ( )
private

Returns a snowfall phenomenon object.

Используется в SakhalData::CalculateWind(), GetNoiseReductionByWeather(), SakhalData::Init() и SakhalData::WeatherOnBeforeChange().

◆ GetSnowflakeScale()

proto native float GetSnowflakeScale ( )
private

Returns the overall scale of snowflakes during snowfall phenomenon.

◆ GetTime()

proto native float GetTime ( )
private

Returns actual time from start of a server (how many seconds elapsed from server start).

◆ GetWind()

proto native vector GetWind ( )
private

Returns wind vector (direction and speed as length of the vector).

◆ GetWindDirection()

proto native WindDirection GetWindDirection ( )
private

Returns a wind direction phenomenon object.

Заметки
Wind direction is angle in radians, typically in the <-PI, +PI> interval.
См. также
See Weather.WindDirectionToAngle and Weather.AngleToWindDirection for conversions.

Используется в WorldData::WeatherOnBeforeChange(), EnochData::WeatherOnBeforeChange() и SakhalData::WeatherOnBeforeChange().

◆ GetWindFunctionParams()

proto void GetWindFunctionParams ( out float fnMin,
out float fnMax,
out float fnSpeed )
private

Reads function parameters that controls the wind behaviour (change in time).

Аргументы
fnMinFunction relative minimum (in range <0, 1>).
fnMaxFunction relative maximum (in range <0, 1>).
fnSpeedControls speed of change of function value.

◆ GetWindMagnitude()

proto native WindMagnitude GetWindMagnitude ( )
private

Returns a wind magnitude phenomenon object.

Заметки
Wind magnitude is the absolute speed in m/s.

Используется в WorldData::WeatherOnBeforeChange(), EnochData::WeatherOnBeforeChange() и SakhalData::WeatherOnBeforeChange().

◆ GetWindMaximumSpeed()

proto native float GetWindMaximumSpeed ( )
private

Returns maximal wind speed in metre per second.

Заметки
By default this value is 10 m/s but it can be overridden in script on mission initialization. Equivalent to getting WindMagnitude phenomenon upper limit.

Используется в WorldData::CalculateVolFog(), EnochData::CalculateVolFog() и SakhalData::CalculateVolFog().

◆ GetWindSpeed()

proto native float GetWindSpeed ( )
private

Returns actual wind speed in metre per second.

Заметки
Wind is changing continuously in time, so the returned value may not stand for too long. Equivalent to WindMagnitude phenomenon actual value.

Используется в WorldData::Init(), EnochData::Init(), SakhalData::Init() и SakhalData::WeatherOnBeforeChange().

◆ IsDynVolFogEnabled()

proto native bool IsDynVolFogEnabled ( )
private

Dynamic volumetric fog only takes effect if enabled in the world config.

Возвращает
Whether the dynamic volumetric fog is enabled.

◆ MissionWeather()

void MissionWeather ( bool use)
inlineprivate
380 {
382 }

Перекрестные ссылки m_missionWeather.

◆ SetDynVolFogDistanceDensity()

proto native void SetDynVolFogDistanceDensity ( float value,
float time = 0 )
private

Sets the dynamic volumetric fog distance density. Only takes effect if dynamic volumetric fog is enabled.

Аргументы
valueDensity percentage in <0,1> range.
timeTransition time in seconds. (0 for immediate effect)

Используется в WorldData::CalculateVolFog(), EnochData::CalculateVolFog() и SakhalData::CalculateVolFog().

◆ SetDynVolFogHeightBias()

proto native void SetDynVolFogHeightBias ( float value,
float time = 0 )
private

Sets the 'dynamic' volumetric height bias. Takes effect only if enabled via world config.

Аргументы
valueHeight offset in meters relative to 0.
timeTransition time in seconds.

Используется в WorldData::CalculateVolFog(), EnochData::CalculateVolFog(), WorldData::Init(), EnochData::Init(), SakhalData::Init() и WorldData::WeatherOnBeforeChange().

◆ SetDynVolFogHeightDensity()

proto native void SetDynVolFogHeightDensity ( float value,
float time = 0 )
private

Sets the dynamic volumetric fog height density. Only takes effect if dynamic volumetric fog is enabled.

Аргументы
valueDensity percentage in <0,1> range.
timeTransition time in seconds. (0 for immediate effect)

Используется в WorldData::CalculateVolFog(), EnochData::CalculateVolFog() и SakhalData::Init().

◆ SetRainThresholds()

proto native void SetRainThresholds ( float tMin,
float tMax,
float tTime )
private

Sets overcast threshold values for rain phenomena.

Rain can start only if actual overcast value is in given range of <tMin, tMax>. If it's already raining and actual overcast value gets out of given range then rain will stop in given tTime seconds.

Default values are: tMin = 0.6 tMax = 1 tTime = 30

Аргументы
tMinMinimal overcast value (in range <0, 1>).
tMaxMaximal overcast value (in range <0, 1>).
tTimeTime in seconds when it stops raining.

Используется в WorldData::WeatherOnBeforeChange() и EnochData::WeatherOnBeforeChange().

◆ SetSnowfallThresholds()

proto native void SetSnowfallThresholds ( float tMin,
float tMax,
float tTime )
private

Sets overcast threshold values for snowfall phenomena.

Snowfall can start only if actual overcast value is in given range of <tMin, tMax>. If it's already snowing and actual overcast value gets out of given range then snowfall will stop in given tTime seconds.

Default values are: tMin = 0.6 tMax = 1 tTime = 30

Аргументы
tMinMinimal overcast value (in range <0, 1>).
tMaxMaximal overcast value (in range <0, 1>).
tTimeTime in seconds when it stops snowing.

Используется в SakhalData::WeatherOnBeforeChange().

◆ SetSnowflakeScale()

proto native void SetSnowflakeScale ( float scale)
private

Sets the overall scale of snowflakes during snowfall phenomenon. This value is not synchronized and should be set by deterministic means.

Аргументы
scaleScale, 1.0 = default

◆ SetStorm()

proto native void SetStorm ( float density,
float threshold,
float timeOut )
private

Sets the thunderstorm properties.

Аргументы
densityA value in <0, 1> range where 0 means no thunderstorms at all and 1 means thunderstorm every time it gets cloudy.
thresholdThe overcast value that must be exceeded so that lightning can appear.
timeOutA minimal time in seconds between lightning during thunderstorm.

Используется в DayZIntroScene::DayZIntroScene(), WorldData::WeatherOnBeforeChange(), EnochData::WeatherOnBeforeChange() и SakhalData::WeatherOnBeforeChange().

◆ SetWind()

proto native void SetWind ( vector wind)
private

Sets the wind vector (direction and speed as length of the vector).

Заметки
Equivalent to setting WindMagnitude and WindDirection phenomenon(s) with zero time and duration.
См. также
See Weather.WindDirectionToAngle and Weather.AngleToWindDirection for conversions.
float len = wind.Normalize();
if ( len > 0 )
{
GetWindMagnitude().Set( len, 0, 0 );
GetWindDirection().Set( angle, 0, 0 );
}
static proto float WindDirectionToAngle(vector dir)
Returns the xz angle of the provided wind vector.
proto native WindMagnitude GetWindMagnitude()
Returns a wind magnitude phenomenon object.
proto native WindDirection GetWindDirection()
Returns a wind direction phenomenon object.

◆ SetWindFunctionParams()

proto native void SetWindFunctionParams ( float fnMin,
float fnMax,
float fnSpeed )
private

Sets function parameters that controls the wind behaviour (change in time).

Аргументы
fnMinFunction relative minimum (in range <0, 1>).
fnMaxFunction relative maximum (in range <0, 1>).
fnSpeedControls speed of change of function value.

Используется в DayZIntroScene::DayZIntroScene().

◆ SetWindMaximumSpeed()

proto native void SetWindMaximumSpeed ( float maxSpeed)
private

Sets the maximal wind speed in metre per second. Equivalent to setting WindMagnitude phenomenon(s) value upper limit.

Используется в DayZIntroScene::DayZIntroScene(), WorldData::WeatherOnBeforeChange(), EnochData::WeatherOnBeforeChange() и SakhalData::WeatherOnBeforeChange().

◆ SetWindSpeed()

proto native void SetWindSpeed ( float speed)
private

Sets the actual wind speed in metre per second.

Заметки
Wind is changing continuously in time, so the returned value may not stand for too long. Minimum speed for wind is 0.1 m/s. Equivalent to setting WindMagnitude phenomenon(s) with zero time and duration.

Используется в DayZIntroScene::DayZIntroScene().

◆ SuppressLightningSimulation()

proto native void SuppressLightningSimulation ( bool state)
private

enables/disables thunderbolt simulation on client (together with sounds)

◆ WindDirectionToAngle()

static proto float WindDirectionToAngle ( vector dir)
staticprivate

Returns the xz angle of the provided wind vector.

Аргументы
dirNon-zero wind vector
Возвращает
Wind angle in the -PI, +PI interval.

Поля

◆ m_missionWeather

bool m_missionWeather
protected

Используется в GetMissionWeather(), MissionWeather() и Weather().


Объявления и описания членов класса находятся в файле: