DayZ 1.24
Loading...
Searching...
No Matches
Weather Class Reference
Collaboration diagram for Weather:
[legend]

Protected Attributes

bool m_missionWeather
 

Private Member Functions

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 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.
 
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.
 
void MissionWeather (bool use)
 
bool GetMissionWeather ()
 

Detailed Description

Weather controller

Definition at line 150 of file Weather.c.

Constructor & Destructor Documentation

◆ Weather()

void Weather::Weather ( )
inlineprivate

Definition at line 154 of file Weather.c.

155 {
156 m_missionWeather = false;
157 }
bool m_missionWeather
Definition Weather.c:152

References m_missionWeather.

◆ ~Weather()

void Weather::~Weather ( )
inlineprivate

Definition at line 159 of file Weather.c.

159{}

Member Function Documentation

◆ GetFog()

proto native Fog Weather::GetFog ( )
private

Returns a fog phenomenon object.

Referenced by DayZIntroScene::DayZIntroScene(), and DayZIntroSceneXbox::DayZIntroSceneXbox().

◆ GetMissionWeather()

bool Weather::GetMissionWeather ( )
inlineprivate

Definition at line 245 of file Weather.c.

246 {
247 return m_missionWeather;
248 }

References m_missionWeather.

◆ GetOvercast()

proto native Overcast Weather::GetOvercast ( )
private

Returns an overcast phenomenon object.

Referenced by DayZIntroScene::DayZIntroScene(), and DayZIntroSceneXbox::DayZIntroSceneXbox().

◆ GetRain()

proto native Rain Weather::GetRain ( )
private

Returns a rain phenomenon object.

Referenced by DayZIntroScene::DayZIntroScene(), and DayZIntroSceneXbox::DayZIntroSceneXbox().

◆ GetTime()

proto native float Weather::GetTime ( )
private

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

◆ GetWind()

proto native vector Weather::GetWind ( )
private

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

◆ GetWindFunctionParams()

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

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

Parameters
fnMinFunction relative minimum (in range <0, 1>).
fnMaxFunction relative maximum (in range <0, 1>).
fnSpeedControls speed of change of function value.

◆ GetWindMaximumSpeed()

proto native float Weather::GetWindMaximumSpeed ( )
private

Returns maximal wind speed in metre per second.

Note
By default this value is 10 m/s but it can be overridden in script on mission initialization.

◆ GetWindSpeed()

proto native float Weather::GetWindSpeed ( )
private

Returns actual wind speed in metre per second.

Note
Wind is changing continuously in time, so the returned value may not stand for too long.

◆ MissionWeather()

void Weather::MissionWeather ( bool use)
inlineprivate

Definition at line 240 of file Weather.c.

241 {
243 }

References m_missionWeather.

◆ SetRainThresholds()

proto native void Weather::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

Parameters
tMinMinimal overcast value (in range <0, 1>).
tMaxMaximal overcast value (in range <0, 1>).
tTimeTime in seconds when it stops raining.

◆ SetStorm()

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

Sets the thunderstorm properties.

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

Referenced by DayZIntroScene::DayZIntroScene().

◆ SetWind()

proto native void Weather::SetWind ( vector wind)
private

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

◆ SetWindFunctionParams()

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

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

Parameters
fnMinFunction relative minimum (in range <0, 1>).
fnMaxFunction relative maximum (in range <0, 1>).
fnSpeedControls speed of change of function value.

Referenced by DayZIntroScene::DayZIntroScene().

◆ SetWindMaximumSpeed()

proto native void Weather::SetWindMaximumSpeed ( float maxSpeed)
private

Sets the maximal wind speed in metre per second.

Referenced by DayZIntroScene::DayZIntroScene().

◆ SetWindSpeed()

proto native void Weather::SetWindSpeed ( float speed)
private

Sets the actual wind speed in metre per second.

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

Referenced by DayZIntroScene::DayZIntroScene().

◆ SuppressLightningSimulation()

proto native void Weather::SuppressLightningSimulation ( bool state)
private

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

Member Data Documentation

◆ m_missionWeather

bool Weather::m_missionWeather
protected

Definition at line 152 of file Weather.c.

Referenced by GetMissionWeather(), MissionWeather(), and Weather().


The documentation for this class was generated from the following file: