Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
WorldData Class Reference

Keeps information about currently loaded world, like temperature. More...

Inheritance diagram for WorldData:
EnochData SakhalData

Protected Member Functions

void WorldData ()
 
void Init ()
 
float GetApproxSunriseTime (float monthday)
 
float GetApproxSunsetTime (float monthday)
 
int GetDaytime ()
 
float CalcBaseEnvironmentTemperature (float monthday, float daytime)
 
void UpdateBaseEnvTemperature (float timeslice)
 
void UpdateWeatherEffects (Weather weather, float timeslice)
 Updates local weather effects.
 
float ComputeSnowflakeScale (Weather weather)
 Returns the desired snowflake scale based on weather simulation state.
 
float GetBaseEnvTemperature ()
 
float GetBaseEnvTemperatureAtObject (notnull Object object)
 
float GetBaseEnvTemperatureAtPosition (vector pos)
 
float GetBaseEnvTemperatureExact (int month, int day, int hour, int minute)
 
float GetLiquidTypeEnviroTemperature (int liquidType)
 
bool WeatherOnBeforeChange (EWeatherPhenomenon type, float actual, float change, float time)
 
array< vectorGetArtyFiringPos ()
 
float GetAgentSpawnChance (eAgents agent)
 
float GetColdAreaToolDamageModifier ()
 
void BaseTempDebug (int month, int day)
 
int GetPollution ()
 
float GetWindCoef ()
 
float GetUniversalTemperatureSourceCapModifier ()
 
float GetTemperature (Object object, EEnvironmentTemperatureComponent properties=EEnvironmentTemperatureComponent.BASE)
 Return actual temperature of environment based on provided parameters.
 
float GetTemperatureComponentValue (float temperatureIn, EEnvironmentTemperatureComponent properties=0)
 Return value of queried EEnvironmentTemperatureComponent which can be used in future calculation(s)
 
float WindEffectTemperatureValue (float temperatureInput)
 
void CalculateWind (int newWeather, bool suddenChange, out float magnitude, out float direction)
 
void CalculateVolFog (float lerpValue, float windMagnitude, float changeTime)
 
void CreateYieldBank ()
 
void InitYieldBank ()
 override this to properly register world-specific yields
 
void SetupWeatherSettings ()
 
void SetupLiquidTemperatures ()
 
CatchYieldBank GetCatchYieldBank ()
 
TStringArray GetDefaultPRAPaths ()
 
float GetDayTemperature ()
 
float GetNightTemperature ()
 
override void Init ()
 
override void SetupWeatherSettings ()
 
override bool WeatherOnBeforeChange (EWeatherPhenomenon type, float actual, float change, float time)
 
override void CalculateWind (int newWeather, bool suddenChange, out float magnitude, out float direction)
 
override void CalculateVolFog (float lerpValue, float windMagnitude, float changeTime)
 
bool LogWeatherData ()
 

Protected Attributes

float SUDDENCHANGE_TIME_MULTIPLIER = 0.2
 
float SUDDENCHANGE_LENGTH_MULTIPLIER = 0.4
 
float WIND_MAGNITUDE_TIME_MULTIPLIER = 0.1
 
float WIND_DIRECTION_TIME_MULTIPLIER = 0.05
 
Weather m_Weather
 
float m_EnvironmentTemperature
 
bool m_EnTempUpdated
 
float m_Timer
 
float m_MaxTemps [12]
 
float m_MinTemps [12]
 
float m_Sunrise_Jan
 
float m_Sunset_Jan
 
float m_Sunrise_Jul
 
float m_Sunset_Jul
 
ref array< vectorm_FiringPos
 
bool m_Pollution
 
ref CatchYieldBank m_YieldBank
 
ref WorldDataWeatherSettings m_WeatherDefaultSettings
 
ref WorldDataLiquidSettings m_LiquidSettings
 
ref TStringArray m_DefaultPlayerRestrictedAreas
 
int m_BadWeatherChance
 weather related
 
int m_ClearWeatherChance
 
bool m_IsSuddenChange
 
float m_WorldWindCoef
 
float m_UniversalTemperatureSourceCapModifier
 
int m_SameWeatherCnt = 0
 
int m_StepValue = 5
 
int m_Chance = 50
 
int m_ChoosenWeather = 1
 
int m_LastWeather = 0
 
float m_DayTemperature = 10
 
float m_NightTemperature = 6
 
const int CLEAR_WEATHER = 1
 DEPRECATED (see WorldDataWeatherConstants)
 
const int CLOUDY_WEATHER = 2
 
const int BAD_WEATHER = 3
 
const int OVERCAST_MIN_TIME = 600
 DEPRECATED (see WorldDataWeatherSettings)
 
const int OVERCAST_MAX_TIME = 900
 
const float RAIN_THRESHOLD = 0.6
 
const int RAIN_TIME_MIN = 60
 
const int RAIN_TIME_MAX = 120
 
const float STORM_THRESHOLD = 0.9
 
int m_clearWeatherChance = m_ClearWeatherChance
 
int m_badWeatherChance = m_BadWeatherChance
 
int m_sameWeatherCnt = m_SameWeatherCnt
 
int m_stepValue = m_StepValue
 
int m_chance = m_Chance
 
int m_choosenWeather = m_ChoosenWeather
 
int m_lastWeather = m_LastWeather
 

Static Protected Attributes

static const ref array< vectorCHERNARUS_ARTY_STRIKE_POS
 

Detailed Description

Keeps information about currently loaded world, like temperature.

Definition at line 2 of file worlddata.c.

Constructor & Destructor Documentation

◆ WorldData()

void WorldData::WorldData ( )
protected

Definition at line 50 of file worlddata.c.

Member Function Documentation

◆ BaseTempDebug()

void WorldData::BaseTempDebug ( int month,
int day )
protected

Definition at line 268 of file worlddata.c.

◆ CalcBaseEnvironmentTemperature()

float WorldData::CalcBaseEnvironmentTemperature ( float monthday,
float daytime )
protected

Definition at line 122 of file worlddata.c.

◆ CalculateVolFog() [1/2]

void WorldData::CalculateVolFog ( float lerpValue,
float windMagnitude,
float changeTime )
protected

◆ CalculateVolFog() [2/2]

override void WorldData::CalculateVolFog ( float lerpValue,
float windMagnitude,
float changeTime )
protected

Definition at line 466 of file chernarusplus.c.

◆ CalculateWind() [1/2]

void WorldData::CalculateWind ( int newWeather,
bool suddenChange,
out float magnitude,
out float direction )
protected

◆ CalculateWind() [2/2]

override void WorldData::CalculateWind ( int newWeather,
bool suddenChange,
out float magnitude,
out float direction )
protected

Definition at line 397 of file chernarusplus.c.

◆ ComputeSnowflakeScale()

float WorldData::ComputeSnowflakeScale ( Weather weather)
protected

Returns the desired snowflake scale based on weather simulation state.

Parameters
weatherWeather instance

Definition at line 194 of file worlddata.c.

◆ CreateYieldBank()

void WorldData::CreateYieldBank ( )
protected

Definition at line 358 of file worlddata.c.

◆ GetAgentSpawnChance()

float WorldData::GetAgentSpawnChance ( eAgents agent)
protected

Definition at line 253 of file worlddata.c.

◆ GetApproxSunriseTime()

float WorldData::GetApproxSunriseTime ( float monthday)
protected

Definition at line 89 of file worlddata.c.

◆ GetApproxSunsetTime()

float WorldData::GetApproxSunsetTime ( float monthday)
protected

Definition at line 96 of file worlddata.c.

◆ GetArtyFiringPos()

array< vector > WorldData::GetArtyFiringPos ( )
protected

Definition at line 247 of file worlddata.c.

◆ GetBaseEnvTemperature()

float WorldData::GetBaseEnvTemperature ( )
protected

Definition at line 206 of file worlddata.c.

◆ GetBaseEnvTemperatureAtObject()

float WorldData::GetBaseEnvTemperatureAtObject ( notnull Object object)
protected

Definition at line 211 of file worlddata.c.

◆ GetBaseEnvTemperatureAtPosition()

float WorldData::GetBaseEnvTemperatureAtPosition ( vector pos)
protected

Definition at line 216 of file worlddata.c.

◆ GetBaseEnvTemperatureExact()

float WorldData::GetBaseEnvTemperatureExact ( int month,
int day,
int hour,
int minute )
protected

Definition at line 223 of file worlddata.c.

◆ GetCatchYieldBank()

CatchYieldBank WorldData::GetCatchYieldBank ( )
protected

Definition at line 387 of file worlddata.c.

◆ GetColdAreaToolDamageModifier()

float WorldData::GetColdAreaToolDamageModifier ( )
protected

Definition at line 262 of file worlddata.c.

◆ GetDayTemperature()

float WorldData::GetDayTemperature ( )
protected

Definition at line 405 of file worlddata.c.

◆ GetDaytime()

int WorldData::GetDaytime ( )
protected

Definition at line 104 of file worlddata.c.

◆ GetDefaultPRAPaths()

TStringArray WorldData::GetDefaultPRAPaths ( )
protected

Definition at line 392 of file worlddata.c.

◆ GetLiquidTypeEnviroTemperature()

float WorldData::GetLiquidTypeEnviroTemperature ( int liquidType)
protected

Definition at line 228 of file worlddata.c.

◆ GetNightTemperature()

float WorldData::GetNightTemperature ( )
protected

Definition at line 410 of file worlddata.c.

◆ GetPollution()

int WorldData::GetPollution ( )
protected

Definition at line 281 of file worlddata.c.

◆ GetTemperature()

float WorldData::GetTemperature ( Object object,
EEnvironmentTemperatureComponent properties = EEnvironmentTemperatureComponent.BASE )
protected

Return actual temperature of environment based on provided parameters.

Parameters
objectReference to object that is used mainly for sea height related calculation
propertiesFlag made of EEnvironmentTemperatureComponent which will influence the resulting value of temperature based on combination of the parts

Definition at line 301 of file worlddata.c.

◆ GetTemperatureComponentValue()

float WorldData::GetTemperatureComponentValue ( float temperatureIn,
EEnvironmentTemperatureComponent properties = 0 )
protected

Return value of queried EEnvironmentTemperatureComponent which can be used in future calculation(s)

Parameters
temperatureBase temperature which will be used in component calculation (currently WIND only)
propertiesFlag made of EEnvironmentTemperatureComponent which will influence the resulting value of temperature based on combination of the parts

Definition at line 326 of file worlddata.c.

◆ GetUniversalTemperatureSourceCapModifier()

float WorldData::GetUniversalTemperatureSourceCapModifier ( )
protected

Definition at line 291 of file worlddata.c.

◆ GetWindCoef()

float WorldData::GetWindCoef ( )
protected

Definition at line 286 of file worlddata.c.

◆ Init() [1/2]

void WorldData::Init ( )
protected

Definition at line 58 of file worlddata.c.

◆ Init() [2/2]

override void WorldData::Init ( )
protected

Definition at line 31 of file chernarusplus.c.

◆ InitYieldBank()

void WorldData::InitYieldBank ( )
protected

override this to properly register world-specific yields

Definition at line 364 of file worlddata.c.

◆ LogWeatherData()

bool WorldData::LogWeatherData ( )
protected

Definition at line 515 of file chernarusplus.c.

◆ SetupLiquidTemperatures()

void WorldData::SetupLiquidTemperatures ( )
protected

Definition at line 374 of file worlddata.c.

◆ SetupWeatherSettings() [1/2]

void WorldData::SetupWeatherSettings ( )
protected

Definition at line 369 of file worlddata.c.

◆ SetupWeatherSettings() [2/2]

override void WorldData::SetupWeatherSettings ( )
protected

Definition at line 81 of file chernarusplus.c.

◆ UpdateBaseEnvTemperature()

void WorldData::UpdateBaseEnvTemperature ( float timeslice)
protected

Definition at line 164 of file worlddata.c.

◆ UpdateWeatherEffects()

void WorldData::UpdateWeatherEffects ( Weather weather,
float timeslice )
protected

Updates local weather effects.

Parameters
weatherWeather instance
timesliceTime delta since last update

Definition at line 184 of file worlddata.c.

◆ WeatherOnBeforeChange() [1/2]

bool WorldData::WeatherOnBeforeChange ( EWeatherPhenomenon type,
float actual,
float change,
float time )
protected

Definition at line 240 of file worlddata.c.

◆ WeatherOnBeforeChange() [2/2]

override bool WorldData::WeatherOnBeforeChange ( EWeatherPhenomenon type,
float actual,
float change,
float time )
protected

Definition at line 91 of file chernarusplus.c.

◆ WindEffectTemperatureValue()

float WorldData::WindEffectTemperatureValue ( float temperatureInput)
protected

Definition at line 344 of file worlddata.c.

Member Data Documentation

◆ BAD_WEATHER

const int WorldData::BAD_WEATHER = 3
protected

Definition at line 526 of file chernarusplus.c.

◆ CHERNARUS_ARTY_STRIKE_POS

const ref array<vector> WorldData::CHERNARUS_ARTY_STRIKE_POS
staticprotected
Initial value:
=
{
"-500.00 165.00 5231.69",
"-500.00 300.00 9934.41",
"10406.86 192.00 15860.00",
"4811.75 370.00 15860.00",
"-500.00 453.00 15860.00"
}

Definition at line 22 of file chernarusplus.c.

◆ CLEAR_WEATHER

const int WorldData::CLEAR_WEATHER = 1
protected

DEPRECATED (see WorldDataWeatherConstants)

Definition at line 524 of file chernarusplus.c.

◆ CLOUDY_WEATHER

const int WorldData::CLOUDY_WEATHER = 2
protected

Definition at line 525 of file chernarusplus.c.

◆ m_BadWeatherChance

int WorldData::m_BadWeatherChance
protected

weather related

Definition at line 36 of file worlddata.c.

◆ m_badWeatherChance

int WorldData::m_badWeatherChance = m_BadWeatherChance
protected

Definition at line 538 of file chernarusplus.c.

◆ m_Chance

int WorldData::m_Chance = 50
protected

Definition at line 46 of file worlddata.c.

◆ m_chance

int WorldData::m_chance = m_Chance
protected

Definition at line 542 of file chernarusplus.c.

◆ m_ChoosenWeather

int WorldData::m_ChoosenWeather = 1
protected

Definition at line 47 of file worlddata.c.

◆ m_choosenWeather

int WorldData::m_choosenWeather = m_ChoosenWeather
protected

Definition at line 544 of file chernarusplus.c.

◆ m_ClearWeatherChance

int WorldData::m_ClearWeatherChance
protected

Definition at line 37 of file worlddata.c.

◆ m_clearWeatherChance

int WorldData::m_clearWeatherChance = m_ClearWeatherChance
protected

Definition at line 537 of file chernarusplus.c.

◆ m_DayTemperature

float WorldData::m_DayTemperature = 10
protected

DEPRECATED

Definition at line 402 of file worlddata.c.

◆ m_DefaultPlayerRestrictedAreas

ref TStringArray WorldData::m_DefaultPlayerRestrictedAreas
protected

Definition at line 33 of file worlddata.c.

◆ m_EnTempUpdated

bool WorldData::m_EnTempUpdated
protected

Definition at line 20 of file worlddata.c.

◆ m_EnvironmentTemperature

float WorldData::m_EnvironmentTemperature
protected

Definition at line 19 of file worlddata.c.

◆ m_FiringPos

ref array<vector> WorldData::m_FiringPos
protected

Definition at line 28 of file worlddata.c.

◆ m_IsSuddenChange

bool WorldData::m_IsSuddenChange
protected

Definition at line 38 of file worlddata.c.

◆ m_LastWeather

int WorldData::m_LastWeather = 0
protected

Definition at line 48 of file worlddata.c.

◆ m_lastWeather

int WorldData::m_lastWeather = m_LastWeather
protected

Definition at line 545 of file chernarusplus.c.

◆ m_LiquidSettings

ref WorldDataLiquidSettings WorldData::m_LiquidSettings
protected

Definition at line 32 of file worlddata.c.

◆ m_MaxTemps

float WorldData::m_MaxTemps[12]
protected

Definition at line 22 of file worlddata.c.

◆ m_MinTemps

float WorldData::m_MinTemps[12]
protected

Definition at line 23 of file worlddata.c.

◆ m_NightTemperature

float WorldData::m_NightTemperature = 6
protected

Definition at line 403 of file worlddata.c.

◆ m_Pollution

bool WorldData::m_Pollution
protected

Definition at line 29 of file worlddata.c.

◆ m_SameWeatherCnt

int WorldData::m_SameWeatherCnt = 0
protected

Definition at line 44 of file worlddata.c.

◆ m_sameWeatherCnt

int WorldData::m_sameWeatherCnt = m_SameWeatherCnt
protected

Definition at line 540 of file chernarusplus.c.

◆ m_StepValue

int WorldData::m_StepValue = 5
protected

Definition at line 45 of file worlddata.c.

◆ m_stepValue

int WorldData::m_stepValue = m_StepValue
protected

Definition at line 541 of file chernarusplus.c.

◆ m_Sunrise_Jan

float WorldData::m_Sunrise_Jan
protected

Definition at line 24 of file worlddata.c.

◆ m_Sunrise_Jul

float WorldData::m_Sunrise_Jul
protected

Definition at line 26 of file worlddata.c.

◆ m_Sunset_Jan

float WorldData::m_Sunset_Jan
protected

Definition at line 25 of file worlddata.c.

◆ m_Sunset_Jul

float WorldData::m_Sunset_Jul
protected

Definition at line 27 of file worlddata.c.

◆ m_Timer

float WorldData::m_Timer
protected

Definition at line 21 of file worlddata.c.

◆ m_UniversalTemperatureSourceCapModifier

float WorldData::m_UniversalTemperatureSourceCapModifier
protected

Definition at line 41 of file worlddata.c.

◆ m_Weather

Weather WorldData::m_Weather
protected

Definition at line 18 of file worlddata.c.

◆ m_WeatherDefaultSettings

ref WorldDataWeatherSettings WorldData::m_WeatherDefaultSettings
protected

Definition at line 31 of file worlddata.c.

◆ m_WorldWindCoef

float WorldData::m_WorldWindCoef
protected

Definition at line 39 of file worlddata.c.

◆ m_YieldBank

ref CatchYieldBank WorldData::m_YieldBank
protected

Definition at line 30 of file worlddata.c.

◆ OVERCAST_MAX_TIME

const int WorldData::OVERCAST_MAX_TIME = 900
protected

Definition at line 530 of file chernarusplus.c.

◆ OVERCAST_MIN_TIME

const int WorldData::OVERCAST_MIN_TIME = 600
protected

DEPRECATED (see WorldDataWeatherSettings)

Definition at line 529 of file chernarusplus.c.

◆ RAIN_THRESHOLD

const float WorldData::RAIN_THRESHOLD = 0.6
protected

Definition at line 532 of file chernarusplus.c.

◆ RAIN_TIME_MAX

const int WorldData::RAIN_TIME_MAX = 120
protected

Definition at line 534 of file chernarusplus.c.

◆ RAIN_TIME_MIN

const int WorldData::RAIN_TIME_MIN = 60
protected

Definition at line 533 of file chernarusplus.c.

◆ STORM_THRESHOLD

const float WorldData::STORM_THRESHOLD = 0.9
protected

Definition at line 535 of file chernarusplus.c.

◆ SUDDENCHANGE_LENGTH_MULTIPLIER

float WorldData::SUDDENCHANGE_LENGTH_MULTIPLIER = 0.4
protected

Definition at line 14 of file worlddata.c.

◆ SUDDENCHANGE_TIME_MULTIPLIER

float WorldData::SUDDENCHANGE_TIME_MULTIPLIER = 0.2
protected

Definition at line 13 of file worlddata.c.

◆ WIND_DIRECTION_TIME_MULTIPLIER

float WorldData::WIND_DIRECTION_TIME_MULTIPLIER = 0.05
protected

Definition at line 16 of file worlddata.c.

◆ WIND_MAGNITUDE_TIME_MULTIPLIER

float WorldData::WIND_MAGNITUDE_TIME_MULTIPLIER = 0.1
protected

Definition at line 15 of file worlddata.c.


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