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

Keeps information about currently loaded world, like temperature. Подробнее...

+ Граф наследования:WorldData:

Защищенные члены

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 ()
 
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 ()
 

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

float SUDDENCHANGE_TIME_MULTIPLIER = 0.2
 how many % of environment temperature can be lowered by clouds
 
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 const ref array< vectorCHERNARUS_ARTY_STRIKE_POS
 

Закрытые данные

const float SPAWN_CHANCE_CHOLERA_DEF = 50
 
const float COLD_AREA_TOOL_DMG_MODIF_DEF = 1
 
float m_TemperaturePerHeightReductionModifier
 directly accesible (defined/overriden in Init())
 
float m_CloudsTemperatureEffectModifier
 amount of °C reduced for each 100 meteres of height above water level
 

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

Keeps information about currently loaded world, like temperature.

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

◆ WorldData()

void WorldData ( )
inlineprotected
52 {
53 Init();
57 }
void Init()
Definition WorldData.c:59
void CreateYieldBank()
Definition WorldData.c:301
void UpdateBaseEnvTemperature(float timeslice)
Definition WorldData.c:165
void InitYieldBank()
override this to properly register world-specific yields
Definition WorldData.c:307

Перекрестные ссылки CreateYieldBank(), Init(), InitYieldBank() и UpdateBaseEnvTemperature().

Методы

◆ BaseTempDebug()

void BaseTempDebug ( int month,
int day )
inlineprotected
270 {
271 Print("--------------------");
272 for ( int i = 0; i < 24; i++ )
273 {
274 for ( int j = 0; j < 6; j++ )
275 {
276 int minute = ( j * 10 );
277 Print(string.Format( "%1:%2 %3", i, minute, GetBaseEnvTemperatureExact( month, day, i, minute ) ) );
278 }
279 }
280 }
Definition EntityAI.c:95
float GetBaseEnvTemperatureExact(int month, int day, int hour, int minute)
Definition WorldData.c:224
proto void Print(void var)
Prints content of variable to console/log.

Перекрестные ссылки GetBaseEnvTemperatureExact() и Print().

◆ CalcBaseEnvironmentTemperature()

float CalcBaseEnvironmentTemperature ( float monthday,
float daytime )
inlineprotected
124 {
128 float nightTime = 24.0 - dayLight;
131 if ( tempArrayIndexToLerp >= 12 )
138 float eveningMinA = minTempA + ( 0.5 * Math.AbsFloat( minTempA - maxTempA ) );
139 float eveningMinB = minTempB + ( 0.5 * Math.AbsFloat( minTempB - maxTempB ) );
140
141 if ( ( daytime >= approxSunrise ) && ( daytime <= approxSunset ) ) {
142 if ( daytime <= ( approxSunrise + ( dayLight * 0.75 ) ) )
143 return Math.Lerp(
146 ( ( daytime - approxSunrise ) / ( dayLight * 0.75 ) ) );
147 else
148 return Math.Lerp(
151 ( ( ( daytime - approxSunrise ) - ( dayLight * 0.75 ) ) / ( dayLight - ( dayLight * 0.75 ) ) ) );
152 } else {
153 if ( ( daytime > approxSunset ) && ( daytime < 24 ) )
154 return Math.Lerp(
157 ( ( daytime - approxSunset ) / ( 24 - approxSunset ) ) / 2.0 );
158 else
159 return Math.Lerp(
162 ( ( ( daytime + ( 24 - approxSunset ) ) / nightTime ) / 2.0 ) + 0.5 );
163 }
164 }
Definition EnMath.c:7
float GetApproxSunsetTime(float monthday)
Definition WorldData.c:97
float m_MaxTemps[12]
Definition WorldData.c:22
float GetApproxSunriseTime(float monthday)
Definition WorldData.c:90
float m_MinTemps[12]
Definition WorldData.c:23
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto float AbsFloat(float f)
Returns absolute value.
static proto float Floor(float f)
Returns floor of value.

Перекрестные ссылки Math::AbsFloat(), Math::Floor(), GetApproxSunriseTime(), GetApproxSunsetTime(), Math::Lerp(), m_MaxTemps и m_MinTemps.

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

◆ CalculateVolFog() [1/2]

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

◆ CalculateVolFog() [2/2]

override void CalculateVolFog ( float lerpValue,
float windMagnitude,
float changeTime )
inlineprotected
467 {
469 int year, month, day, hour, minute;
470 GetGame().GetWorld().GetDate(year, month, day, hour, minute);
471
472 if ( hour < 9 && hour >= 5 )
473 {
475 heigthDensity = Math.Lerp( 0.8, 1, lerpValue);
476
478
479 if (heightBias == m_WeatherDefaultSettings.m_DefaultHeigthBias) //checks if the randomization has been done
480 {
481 int diceRoll = Math.RandomIntInclusive(1,100);
482
483 if (diceRoll < 50)
484 {
485 heightBias = Math.RandomInt(m_WeatherDefaultSettings.m_DefaultHeigthBias + 1, 80);
486 }
487 else if (diceRoll < 85)
488 {
489 heightBias = Math.RandomInt(80, 120);
490 }
491 else
492 {
493 heightBias = Math.RandomInt(120, 200);
494 }
495 }
496 }
497 else if ( hour < 18 && hour >= 9 )
498 {
500 heigthDensity = Math.Lerp( 0.9, 1, lerpValue);
501 heightBias = m_WeatherDefaultSettings.m_DefaultHeigthBias;
502 }
503 else
504 {
506 heigthDensity = Math.Lerp( 0.9, 1, lerpValue);
507 heightBias = m_WeatherDefaultSettings.m_DefaultHeigthBias;
508 }
509
513 }
proto native float GetDynVolFogHeightBias()
Returns the current 'dynamic' volumetric fog height bias in meters.
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 void SetDynVolFogDistanceDensity(float value, float time=0)
Sets the dynamic volumetric fog distance density. Only takes effect if dynamic volumetric fog is enab...
proto native float GetWindMaximumSpeed()
Returns maximal wind speed in metre per second.
proto native void SetDynVolFogHeightDensity(float value, float time=0)
Sets the dynamic volumetric fog height density. Only takes effect if dynamic volumetric fog is enable...
ref WorldDataWeatherSettings m_WeatherDefaultSettings
Definition WorldData.c:31
Weather m_Weather
Definition WorldData.c:18
proto native CGame GetGame()
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].
Definition EnMath.c:54

Перекрестные ссылки Math::Clamp(), Weather::GetDynVolFogHeightBias(), GetGame(), Weather::GetWindMaximumSpeed(), Math::Lerp(), m_Weather, Math::RandomInt(), Math::RandomIntInclusive(), Weather::SetDynVolFogDistanceDensity(), Weather::SetDynVolFogHeightBias() и Weather::SetDynVolFogHeightDensity().

◆ CalculateWind() [1/2]

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

◆ CalculateWind() [2/2]

override void CalculateWind ( int newWeather,
bool suddenChange,
out float magnitude,
out float direction )
inlineprotected
398 {
399 magnitude = 5;
400 direction = 0;
401
402 float windChance = Math.RandomIntInclusive( 0, 100 );
403
404 if ( newWeather == WorldDataWeatherConstants.CLEAR_WEATHER )
405 {
406 if ( windChance < 30 )
407 {
409 direction = Math.RandomFloatInclusive( -1.0 , -0.5);
410 }
411 else if ( windChance < 75 )
412 {
414 direction = Math.RandomFloatInclusive( -1.3 , -0.9);
415 }
416 else
417 {
419 direction = Math.RandomFloatInclusive( -0.6 , 0.0);
420 }
421
422 }
423 else if ( newWeather == WorldDataWeatherConstants.CLOUDY_WEATHER )
424 {
425 if ( windChance < 45 )
426 {
428 direction = Math.RandomFloatInclusive( -3.14 , -2.4);
429 }
430 else if ( windChance < 90 )
431 {
433 direction = Math.RandomFloatInclusive( -2.6, -2.0);
434 }
435 else
436 {
438 direction = Math.RandomFloatInclusive( -2.2 , -1.4);
439 }
440 }
441 else
442 {
443 if ( suddenChange || m_Weather.GetOvercast().GetActual() > m_WeatherDefaultSettings.m_StormThreshold || m_Weather.GetOvercast().GetForecast() - m_Weather.GetOvercast().GetActual() >= 0.4 )
444 {
446 direction = Math.RandomFloatInclusive( 0.9 , 1.45);
447 }
448 else if ( windChance < 45 )
449 {
451 direction = Math.RandomFloatInclusive( 1.45, 1.7);
452 }
453 else if ( windChance < 90 )
454 {
457 }
458 else
459 {
461 direction = Math.RandomFloatInclusive( 1.9, 2.2 );
462 }
463 }
464 }
proto native Overcast GetOvercast()
Returns an overcast phenomenon object.
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:106

Перекрестные ссылки Weather::GetOvercast(), m_Weather, Math::RandomFloatInclusive() и Math::RandomIntInclusive().

◆ ComputeSnowflakeScale()

float ComputeSnowflakeScale ( Weather weather)
inlineprotected

Returns the desired snowflake scale based on weather simulation state.

Аргументы
weatherWeather instance
196 {
197 float overcast01 = Math.Clamp( Math.InverseLerp( 0.4, 1.0, weather.GetOvercast().GetActual() ), 0.0, 1.0 ); // remap range to <0.4, 1.0> snowfall overcast threshold
198 float wind01 = weather.GetWindSpeed() / weather.GetWindMaximumSpeed();
199
200 float overcastScale = Math.Lerp( 0.50, 1.25, overcast01 );
201 float windScale = Math.Lerp( 1.25, 1.00, wind01 );
202
203 return Math.Clamp( overcastScale * windScale, 0.50, 1.25 );
204 }
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...

Перекрестные ссылки Math::Clamp(), Math::InverseLerp() и Math::Lerp().

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

◆ CreateYieldBank()

void CreateYieldBank ( )
inlineprotected
302 {
304 }
Definition CatchYieldBank.c:4
ref CatchYieldBank m_YieldBank
Definition WorldData.c:30

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

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

◆ GetAgentSpawnChance()

float GetAgentSpawnChance ( eAgents agent)
inlineprotected
255 {
256 if (agent == eAgents.CHOLERA)
258
259 return 0;
260 }
eAgents
Definition EAgents.c:3
const float SPAWN_CHANCE_CHOLERA_DEF
Definition WorldData.c:4

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

◆ GetApproxSunriseTime()

float GetApproxSunriseTime ( float monthday)
inlineprotected
91 {
92 if ( monthday <= 8.0 )
93 return ( ( m_Sunrise_Jan - m_Sunrise_Jul ) / ( 8 - 1 ) ) * ( 1 - monthday ) + m_Sunrise_Jan;
94 else
95 return ( ( ( monthday - 8 ) * ( m_Sunrise_Jan - m_Sunrise_Jul ) ) / ( 13 - 8 ) ) + m_Sunrise_Jul;
96 }
float m_Sunrise_Jan
Definition WorldData.c:24
float m_Sunrise_Jul
Definition WorldData.c:26

Перекрестные ссылки m_Sunrise_Jan и m_Sunrise_Jul.

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

◆ GetApproxSunsetTime()

float GetApproxSunsetTime ( float monthday)
inlineprotected
98 {
99 if ( monthday <= 8.0 )
100 return ( ( m_Sunset_Jan - m_Sunset_Jul ) / (8 - 1) ) * ( 1 - monthday ) + m_Sunset_Jan;
101 else
102 return ( ( ( monthday - 8 ) * ( m_Sunset_Jan - m_Sunset_Jul ) ) / ( 13 - 8 ) ) + m_Sunset_Jul;
103 }
float m_Sunset_Jul
Definition WorldData.c:27
float m_Sunset_Jan
Definition WorldData.c:25

Перекрестные ссылки m_Sunset_Jan и m_Sunset_Jul.

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

◆ GetArtyFiringPos()

array< vector > GetArtyFiringPos ( )
inlineprotected
249 {
250 return m_FiringPos;
251 }
ref array< vector > m_FiringPos
Definition WorldData.c:28

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

◆ GetBaseEnvTemperature()

float GetBaseEnvTemperature ( )
inlineprotected
208 {
210 }
float m_EnvironmentTemperature
Definition WorldData.c:19

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

◆ GetBaseEnvTemperatureAtObject()

float GetBaseEnvTemperatureAtObject ( notnull Object object)
inlineprotected
213 {
215 }
class JsonUndergroundAreaTriggerData GetPosition
Definition UndergroundAreaLoader.c:9
float GetBaseEnvTemperatureAtPosition(vector pos)
Definition WorldData.c:217

Перекрестные ссылки GetBaseEnvTemperatureAtPosition() и GetPosition.

◆ GetBaseEnvTemperatureAtPosition()

float GetBaseEnvTemperatureAtPosition ( vector pos)
inlineprotected
218 {
219 float terrainHeight = pos[1];
222 }
float m_TemperaturePerHeightReductionModifier
directly accesible (defined/overriden in Init())
Definition WorldData.c:8
static proto float Max(float x, float y)
Returns bigger of two given values.

Перекрестные ссылки m_EnvironmentTemperature, m_TemperaturePerHeightReductionModifier и Math::Max().

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

◆ GetBaseEnvTemperatureExact()

float GetBaseEnvTemperatureExact ( int month,
int day,
int hour,
int minute )
inlineprotected
225 {
226 return CalcBaseEnvironmentTemperature( month + ( day / 32.0 ), hour + ( minute / 60.0 ) );
227 }
float CalcBaseEnvironmentTemperature(float monthday, float daytime)
Definition WorldData.c:123

Перекрестные ссылки CalcBaseEnvironmentTemperature().

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

◆ GetCatchYieldBank()

CatchYieldBank GetCatchYieldBank ( )
inlineprotected
331 {
332 return m_YieldBank;
333 }

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

◆ GetColdAreaToolDamageModifier()

float GetColdAreaToolDamageModifier ( )
inlineprotected
264 {
266 }
const float COLD_AREA_TOOL_DMG_MODIF_DEF
Definition WorldData.c:5

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

◆ GetDayTemperature()

float GetDayTemperature ( )
inlineprotected
349 {
350 return m_DayTemperature;
351 }
float m_DayTemperature
Definition WorldData.c:345

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

◆ GetDaytime()

int GetDaytime ( )
inlineprotected
106 {
107 int year, month, day, hour, minute;
108 GetGame().GetWorld().GetDate(year, month, day, hour, minute);
109
110 float sunriseTimeStart = g_Game.GetMission().GetWorldData().GetApproxSunriseTime(month);
111 float sunsetTimeStart = g_Game.GetMission().GetWorldData().GetApproxSunsetTime(month);
112
113 if (hour >= sunriseTimeStart && hour < (sunriseTimeStart + 2))
114 return WorldDataDaytime.DAWN;
115 else if (hour >= (sunriseTimeStart + 2) && hour < sunsetTimeStart)
116 return WorldDataDaytime.DAY;
117 else if (hour >= sunsetTimeStart && hour < (sunsetTimeStart + 2))
118 return WorldDataDaytime.DUSK;
119
120 return WorldDataDaytime.NIGHT;
121 }
DayZGame g_Game
Definition DayZGame.c:3815
Definition WorldData.c:406
static int NIGHT
Definition WorldData.c:408
static int DAY
Definition WorldData.c:409
static int DAWN
Definition WorldData.c:411
static int DUSK
Definition WorldData.c:410

Перекрестные ссылки WorldDataDaytime::DAWN, WorldDataDaytime::DAY, WorldDataDaytime::DUSK, g_Game, GetGame() и WorldDataDaytime::NIGHT.

◆ GetDefaultPRAPaths()

TStringArray GetDefaultPRAPaths ( )
inlineprotected
336 {
338 }
ref TStringArray m_DefaultPlayerRestrictedAreas
Definition WorldData.c:33

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

◆ GetLiquidTypeEnviroTemperature()

float GetLiquidTypeEnviroTemperature ( int liquidType)
inlineprotected
230 {
231 if (m_LiquidSettings.m_Temperatures.Count() > 0 && m_LiquidSettings.m_Temperatures.Contains(liquidType) != INDEX_NOT_FOUND)
232 return m_LiquidSettings.m_Temperatures.Get(liquidType);
233
234 #ifdef DEVELOPER
235 ErrorEx("Undefined enviro temperature for liquid type: " + liquidType);
236 #endif
237
239 }
ref WorldDataLiquidSettings m_LiquidSettings
Definition WorldData.c:32
const int INDEX_NOT_FOUND
Definition gameplay.c:13
enum ShapeType ErrorEx

Перекрестные ссылки ErrorEx, INDEX_NOT_FOUND, m_EnvironmentTemperature и m_LiquidSettings.

◆ GetNightTemperature()

float GetNightTemperature ( )
inlineprotected
354 {
355 return m_NightTemperature;
356 }
float m_NightTemperature
Definition WorldData.c:346

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

◆ GetPollution()

int GetPollution ( )
inlineprotected
283 {
284 return m_Pollution;
285 }
bool m_Pollution
Definition WorldData.c:29

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

◆ GetUniversalTemperatureSourceCapModifier()

float GetUniversalTemperatureSourceCapModifier ( )
inlineprotected
293 {
295 }
float m_UniversalTemperatureSourceCapModifier
Definition WorldData.c:41

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

◆ GetWindCoef()

float GetWindCoef ( )
inlineprotected
288 {
289 return m_WorldWindCoef;
290 }
float m_WorldWindCoef
Definition WorldData.c:39

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

◆ Init() [1/2]

void Init ( )
inlineprotected
60 {
63
64 m_EnTempUpdated = false;
65 m_Weather = g_Game.GetWeather();
67 m_Timer = 0.0;
68 m_Sunrise_Jan = 8.54;
69 m_Sunset_Jan = 15.52;
70 m_Sunrise_Jul = 3.26;
71 m_Sunset_Jul = 20.73;
72 m_MaxTemps = {3,5,7,14,19,24,26,25,21,16,10,5};
73 m_MinTemps = {-3,-2,0,4,9,14,18,17,12,7,4,0};
75 m_WorldWindCoef = 0.5;
76
78
83
86
88 }
int m_ClearWeatherChance
Definition WorldData.c:37
void SetupLiquidTemperatures()
Definition WorldData.c:317
float m_CloudsTemperatureEffectModifier
amount of °C reduced for each 100 meteres of height above water level
Definition WorldData.c:9
int m_BadWeatherChance
weather related
Definition WorldData.c:36
float m_Timer
Definition WorldData.c:21
bool m_EnTempUpdated
Definition WorldData.c:20
void SetupWeatherSettings()
Definition WorldData.c:312

Перекрестные ссылки g_Game, m_BadWeatherChance, m_ClearWeatherChance, m_CloudsTemperatureEffectModifier, m_DefaultPlayerRestrictedAreas, m_EnTempUpdated, m_EnvironmentTemperature, m_MaxTemps, m_MinTemps, m_Pollution, m_Sunrise_Jan, m_Sunrise_Jul, m_Sunset_Jan, m_Sunset_Jul, m_TemperaturePerHeightReductionModifier, m_Timer, m_UniversalTemperatureSourceCapModifier, m_Weather, m_WeatherDefaultSettings, m_WorldWindCoef, SetupLiquidTemperatures() и SetupWeatherSettings().

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

◆ Init() [2/2]

override void Init ( )
inlineprotected
32 {
33 super.Init();
34
35 // new temperature curve settings
36 m_Sunrise_Jan = 8.54;
37 m_Sunset_Jan = 15.52;
38 m_Sunrise_Jul = 3.26;
39 m_Sunset_Jul = 20.73;
40
41 int tempIdx;
42 m_MinTemps = {-3,-2,0,4,9,14,18,17,13,11,9,0}; //{-3,-2,0,4,9,14,18,17,12,7,4,0} original values
44 {
46 {
48 }
49 }
50
51 m_MaxTemps = {3,5,7,14,19,24,26,25,18,14,10,5}; //{3,5,7,14,19,24,26,25,21,16,10,5} original values
53 {
55 {
57 }
58 }
59
61
62 m_WorldWindCoef = 0.4;
65
67
68 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
69 {
71
72 if (GetGame().IsMultiplayer())
73 {
74 float startingOvercast = Math.RandomFloat(0.2,0.75);
75 m_Weather.GetOvercast().Set(startingOvercast,0,5); //forcing a random weather at a clean server start and an instant change for overcast
77 }
78 }
79 }
@ Count
Definition RandomGeneratorSyncManager.c:8
Definition CfgGameplayHandler.c:2
static array< float > GetEnvironmentMinTemps()
Definition CfgGameplayHandler.c:146
static array< float > GetEnvironmentMaxTemps()
Definition CfgGameplayHandler.c:151
proto native float GetWindSpeed()
Returns actual wind speed in metre per second.
void CalculateVolFog(float lerpValue, float windMagnitude, float changeTime)
static const ref array< vector > CHERNARUS_ARTY_STRIKE_POS
Definition ChernarusPlus.c:22
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].

Перекрестные ссылки Count, CfgGameplayHandler::GetEnvironmentMaxTemps(), CfgGameplayHandler::GetEnvironmentMinTemps(), GetGame(), Weather::GetOvercast(), Weather::GetWindSpeed(), m_Weather, Math::RandomFloat() и Weather::SetDynVolFogHeightBias().

◆ InitYieldBank()

void InitYieldBank ( )
inlineprotected

override this to properly register world-specific yields

308 {
309 GetDayZGame().GetYieldDataInitInvoker().Invoke(m_YieldBank); //injects defaults from 4_World and above
310 }
DayZGame GetDayZGame()
Definition DayZGame.c:3817

Перекрестные ссылки GetDayZGame() и m_YieldBank.

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

◆ LogWeatherData()

bool LogWeatherData ( )
inlineprotected
516 {
517 #ifdef WEATHER_DATA_LOGGING
518 return true;
519 #endif
520 return false;
521 }

◆ SetupLiquidTemperatures()

void SetupLiquidTemperatures ( )
inlineprotected
318 {
320
321 m_LiquidSettings.m_Temperatures[LIQUID_SALTWATER] = 23.0;
322 m_LiquidSettings.m_Temperatures[LIQUID_WATER] = 15.0;
323 m_LiquidSettings.m_Temperatures[LIQUID_STILLWATER] = 15.0;
324 m_LiquidSettings.m_Temperatures[LIQUID_RIVERWATER] = 15.0;
325 m_LiquidSettings.m_Temperatures[LIQUID_FRESHWATER] = 15.0;
326 m_LiquidSettings.m_Temperatures[LIQUID_CLEANWATER] = 10.0;
327 m_LiquidSettings.m_Temperatures[LIQUID_SNOW] = -5.0;
328 }
const int LIQUID_STILLWATER
Definition constants.c:529
const int LIQUID_FRESHWATER
Definition constants.c:528
const int LIQUID_CLEANWATER
Definition constants.c:531
const int LIQUID_WATER
Definition constants.c:518
const int LIQUID_RIVERWATER
Definition constants.c:519
const int LIQUID_SALTWATER
Definition constants.c:527
const int LIQUID_SNOW
Definition constants.c:526

Перекрестные ссылки LIQUID_CLEANWATER, LIQUID_FRESHWATER, LIQUID_RIVERWATER, LIQUID_SALTWATER, LIQUID_SNOW, LIQUID_STILLWATER, LIQUID_WATER и m_LiquidSettings.

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

◆ SetupWeatherSettings() [1/2]

void SetupWeatherSettings ( )
inlineprotected
313 {
315 }
Definition WorldData.c:367

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

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

◆ SetupWeatherSettings() [2/2]

override void SetupWeatherSettings ( )
inlineprotected
82 {
83 super.SetupWeatherSettings();
84
85 m_WeatherDefaultSettings.m_StormThreshold = 0.9;
86 m_WeatherDefaultSettings.m_GlobalSuddenChance = 0;
87 m_WeatherDefaultSettings.m_BadWeatherSuddenChance = 0;
88 m_WeatherDefaultSettings.m_DefaultHeigthBias = 50;
89 }

◆ UpdateBaseEnvTemperature()

void UpdateBaseEnvTemperature ( float timeslice)
inlineprotected
166 {
168 if (m_Timer > 30 || !m_EnTempUpdated)
169 {
170 int year, month, day, hour, minute;
171 GetGame().GetWorld().GetDate( year, month, day, hour, minute );
173 m_Timer = 0;
174
175 if (!m_EnTempUpdated)
176 m_EnTempUpdated = true;
177 }
178 }

Перекрестные ссылки CalcBaseEnvironmentTemperature(), GetGame(), m_EnTempUpdated, m_EnvironmentTemperature и m_Timer.

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

◆ UpdateWeatherEffects()

void UpdateWeatherEffects ( Weather weather,
float timeslice )
inlineprotected

Updates local weather effects.

Аргументы
weatherWeather instance
timesliceTime delta since last update
186 {
188 weather.SetSnowflakeScale( snowflakeScale );
189 }
float ComputeSnowflakeScale(Weather weather)
Returns the desired snowflake scale based on weather simulation state.
Definition WorldData.c:195

Перекрестные ссылки ComputeSnowflakeScale().

◆ WeatherOnBeforeChange() [1/2]

bool WeatherOnBeforeChange ( EWeatherPhenomenon type,
float actual,
float change,
float time )
inlineprotected
242 {
243 // default behaviour is same like setting MissionWeather (in Weather) to true
244 return false;
245 }

◆ WeatherOnBeforeChange() [2/2]

override bool WeatherOnBeforeChange ( EWeatherPhenomenon type,
float actual,
float change,
float time )
inlineprotected
92 {
93 #ifdef WEATHER_DATA_LOGGING
94 if ( !dayInit )
95 {
96 GetGame().GetWorld().GetDate(startYear, startMonth, startDay, startHour, startMinute);
97 dayInit = true;
98 }
99 #endif
100
101 float phmnTime = 5;
102 float phmnLength = 10;
103 float phmnValue = 0;
104
105 m_Weather.SetStorm( 1.0, m_WeatherDefaultSettings.m_StormThreshold, 45 );
106
107 m_Weather.SetRainThresholds( m_WeatherDefaultSettings.m_RainThreshold, 1.0, 60 );
109
111 {
113 }
114
115 switch (type)
116 {
117 //-----------------------------------------------------------------------------------------------------------------------------
118 case EWeatherPhenomenon.OVERCAST:
119 {
120 #ifdef WEATHER_DATA_LOGGING
122 #endif
123
124 float windDirection, windMag;
125
126 //went something goes wrong choose some default random weather
127 phmnValue = Math.RandomFloatInclusive( 0.2, 0.7 );
128 phmnTime = Math.RandomIntInclusive( m_WeatherDefaultSettings.m_OvercastMinTime, m_WeatherDefaultSettings.m_OvercastMaxTime );
129 phmnLength = Math.RandomIntInclusive( m_WeatherDefaultSettings.m_OvercastMinLength, m_WeatherDefaultSettings.m_OvercastMaxLength );
130
131 //----
132 //calculate next weather
133 m_Chance = Math.RandomIntInclusive( 0, 100 );
134
135 //--
136 if ( m_LastWeather == WorldDataWeatherConstants.CLEAR_WEATHER )
137 {
138 m_ClearWeatherChance -= ( m_StepValue * m_SameWeatherCnt); //decrease the chance of the same weather
139 }
140
141 if ( m_LastWeather == WorldDataWeatherConstants.CLOUDY_WEATHER )
142 {
143 m_ClearWeatherChance += ( m_StepValue * m_SameWeatherCnt); //increase the chance of the better weather
144 }
145
146 if ( m_LastWeather == WorldDataWeatherConstants.BAD_WEATHER )
147 {
148 m_ClearWeatherChance += m_StepValue; //increase the chance of the better weather slightly
149 m_BadWeatherChance += (( m_StepValue * m_SameWeatherCnt ) + m_StepValue ); //decrease the chance of the same weather rapidly
150 }
151
152 //----
154 {
156 if ( m_LastWeather == WorldDataWeatherConstants.CLEAR_WEATHER )
158 }
159 else if ( m_Chance > m_BadWeatherChance )
160 {
162 if ( m_LastWeather == WorldDataWeatherConstants.BAD_WEATHER )
164 }
165 else
166 {
168 if ( m_LastWeather == WorldDataWeatherConstants.CLOUDY_WEATHER )
170 }
171
174
175 m_ClearWeatherChance = m_WeatherDefaultSettings.m_ClearWeatherChance;
176 m_BadWeatherChance = m_WeatherDefaultSettings.m_BadWeatherChance;
177
178 //----
179 //set choosen weather
180 if ( m_ChoosenWeather == WorldDataWeatherConstants.CLEAR_WEATHER )
181 {
183 #ifdef WEATHER_DATA_LOGGING
185 #endif
186
187 phmnValue = Math.RandomFloatInclusive( 0.0, 0.3 );
188 phmnTime = Math.RandomIntInclusive( m_WeatherDefaultSettings.m_OvercastMinTime, m_WeatherDefaultSettings.m_OvercastMaxTime );
189 phmnLength = Math.RandomIntInclusive( m_WeatherDefaultSettings.m_OvercastMinLength, m_WeatherDefaultSettings.m_OvercastMaxLength );
190 }
191
192 if ( m_ChoosenWeather == WorldDataWeatherConstants.CLOUDY_WEATHER )
193 {
195 #ifdef WEATHER_DATA_LOGGING
197 #endif
198
199 phmnValue = Math.RandomFloatInclusive( 0.3, 0.6 );
200 phmnTime = Math.RandomIntInclusive( m_WeatherDefaultSettings.m_OvercastMinTime, m_WeatherDefaultSettings.m_OvercastMaxTime );
201 phmnLength = Math.RandomIntInclusive( m_WeatherDefaultSettings.m_OvercastMinLength, m_WeatherDefaultSettings.m_OvercastMaxLength );
202 }
203
204 if ( m_ChoosenWeather == WorldDataWeatherConstants.BAD_WEATHER )
205 {
207 #ifdef WEATHER_DATA_LOGGING
209 #endif
210
211 phmnValue = Math.RandomFloatInclusive( 0.6, 1.0 );
212 phmnTime = Math.RandomIntInclusive( m_WeatherDefaultSettings.m_OvercastMinTime, m_WeatherDefaultSettings.m_OvercastMaxTime );
213 phmnLength = Math.RandomIntInclusive( m_WeatherDefaultSettings.m_OvercastMinLength, m_WeatherDefaultSettings.m_OvercastMaxLength );
214 }
215
217
219 m_Weather.GetWindMagnitude().Set( windMag, phmnTime * WIND_MAGNITUDE_TIME_MULTIPLIER , phmnTime * (1 - WIND_MAGNITUDE_TIME_MULTIPLIER) ); // magnitude change happens during the overcast change, after overcast change finishes wind will decrease a bit
221
223
224 Debug.WeatherLog(string.Format("Chernarus::Weather::Overcast:: (%1) overcast: %2", g_Game.GetDayTime(), actual));
225 Debug.WeatherLog(string.Format("Chernarus::Weather::Overcast::Rain:: (%1) %2", g_Game.GetDayTime(), m_Weather.GetRain().GetActual()));
226
227 #ifdef WEATHER_DATA_LOGGING
228 int testYear = 0;
229 int testMonth = 0;
230 int testDay = 0;
231 int testHour = 0;
232 int testMinute = 0;
233 GetGame().GetWorld().GetDate(testYear, testMonth, testDay, testHour, testMinute);
234
235 if ( testDay - startDay > currentDay && testHour - startHour >= 0 && testMinute - startMinute >= 0 )
236 {
237 FileHandle file = OpenFile("$profile:OvercastCountsCharnarus" + (currentDay + 1) + ".log", FileMode.WRITE);
238 FPrintln(file, "================================================================");
239 FPrintln(file," ================== Day " + (currentDay + 1) + " ================== ");
240 FPrintln(file, "================================================================");
241 FPrintln(file, "Overcast Change Count: " + overcastChangeCount);
242 FPrintln(file, "Bad Weather Change Count: " + badWeatherCount);
243 FPrintln(file, "Cloudy Weather Count: " + cloudyWeatherCount);
244 FPrintln(file, "Clear Weather Count: " + clearWeatherCount);
245
246 currentDay++;
248 if ( currentDay == daysToRun )
249 {
250 g_Game.RequestExit(IDC_MAIN_QUIT);
251 }
252
254 badWeatherCount = 0;
257 }
258 #endif
259
260 return true;
261 }
262 //-----------------------------------------------------------------------------------------------------------------------------
263 case EWeatherPhenomenon.RAIN:
264 {
265 float actualOvercast = m_Weather.GetOvercast().GetActual();
266
267 m_Chance = Math.RandomIntInclusive( 0, 100 );
268 phmnValue = 0.2;
269 phmnTime = 90;
270 phmnLength = 30;
271
272 if ( actualOvercast <= m_WeatherDefaultSettings.m_RainThreshold )
273 {
274 m_Weather.GetRain().Set( 0.0, m_WeatherDefaultSettings.m_RainTimeMin, m_WeatherDefaultSettings.m_RainTimeMax );
275 Debug.WeatherLog(string.Format("Chernarus::Weather::Rain::ForceEnd:: (%1) %2 -> 0", g_Game.GetDayTime(), actual));
276 return true;
277 }
278
279 if ( actualOvercast > m_WeatherDefaultSettings.m_StormThreshold )
280 {
281 phmnValue = Math.RandomFloatInclusive( 0.8, 1.0 );
283 phmnLength = 0;
284
286 Debug.WeatherLog(string.Format("Chernarus::Weather::Rain::ForceStorm:: (%1) %2 -> %3", g_Game.GetDayTime(), actual, phmnValue));
287 return true;
288 }
289
290 //make a differnce in "normal rain"
291 if ( actualOvercast < 0.75 )
292 {
293 if ( m_Chance < 30 )
294 {
295 phmnValue = Math.RandomFloatInclusive( 0.1, 0.3 );
297 phmnLength = 0;
298 }
299 else if ( m_Chance < 60 )
300 {
301 phmnValue = Math.RandomFloatInclusive( 0.2, 0.5 );
303 phmnLength = 0;
304 }
305 else if ( m_Chance < 80 )
306 {
307 phmnValue = Math.RandomFloatInclusive( 0.0, 0.2 );
309 phmnLength = 0;
310 }
311 else //also have the chance to not have rain at all
312 {
313 phmnValue = 0;
315 phmnLength = m_WeatherDefaultSettings.m_RainLengthMax;
316 }
317 }
318 else
319 {
320 if ( m_Chance < 25 )
321 {
322 phmnValue = Math.RandomFloatInclusive( 0.5, 0.7 );
324 phmnLength = 0;
325 }
326 else if ( m_Chance < 50 )
327 {
328 phmnValue = Math.RandomFloatInclusive( 0.2, 0.4 );
330 phmnLength = 0;
331 }
332 else if ( m_Chance < 75 )
333 {
334 phmnValue = Math.RandomFloatInclusive( 0.4, 0.6 );
336 phmnLength = 0;
337 }
338 else //also have the chance to not have rain at all
339 {
340 phmnValue = 0;
342 phmnLength = m_WeatherDefaultSettings.m_RainLengthMax;
343 }
344 }
345
347
348 Debug.WeatherLog(string.Format("Chernarus::Weather::Rain:: (%1) %2", g_Game.GetDayTime(), actual));
349
350 return true;
351 }
352 //-----------------------------------------------------------------------------------------------------------------------------
353 case EWeatherPhenomenon.FOG:
354 {
355 float fogMin = 0.0;
356 float fogMax = 0.15;
357 float fogTime = 1800.0;
358
359 float fogyMorning = Math.RandomFloatInclusive( 0.0, 1.0 );
360
361 if ( fogyMorning > 0.85 )
362 {
363 if ( (g_Game.GetDayTime() > 4 && g_Game.GetDayTime() < 7 ) )
364 {
365 fogMin = 0.10;
366 fogMax = 0.35;
367 fogTime = 300;
368 }
369 }
370
371 if ( m_Weather.GetOvercast().GetActual() < 0.3 )
372 {
373 fogMin = 0.0;
374 fogMax = 0.08;
375 fogTime = 900.0;
376 }
377
379
380 Debug.WeatherLog(string.Format("Chernarus::Weather::Fog:: (%1) %2", g_Game.GetDayTime(), actual));
381
382 return true;
383 }
384 //-----------------------------------------------------------------------------------------------------------------------------
385 case EWeatherPhenomenon.WIND_MAGNITUDE:
386 {
388 m_Weather.GetWindMagnitude().Set(m_Weather.GetWindMagnitude().GetActual() * 0.75, phmnTime , m_WeatherDefaultSettings.m_OvercastMaxLength); // next change will be happen with the overcast change
389
390 return true;
391 }
392 }
393
394 return false;
395 }
EWeatherPhenomenon
Definition Weather.c:11
Definition Debug.c:14
static void WeatherLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Definition Debug.c:209
proto native void SetStorm(float density, float threshold, float timeOut)
Sets the thunderstorm properties.
proto native void SetWindMaximumSpeed(float maxSpeed)
Sets the maximal wind speed in metre per second. Equivalent to setting WindMagnitude phenomenon(s) va...
proto native WindMagnitude GetWindMagnitude()
Returns a wind magnitude phenomenon object.
proto native void SetRainThresholds(float tMin, float tMax, float tTime)
Sets overcast threshold values for rain phenomena.
proto native Rain GetRain()
Returns a rain phenomenon object.
proto native WindDirection GetWindDirection()
Returns a wind direction phenomenon object.
proto native Fog GetFog()
Returns a fog phenomenon object.
int m_LastWeather
Definition WorldData.c:48
int m_ChoosenWeather
Definition WorldData.c:47
float WIND_MAGNITUDE_TIME_MULTIPLIER
Definition WorldData.c:15
int m_StepValue
Definition WorldData.c:45
int m_Chance
Definition WorldData.c:46
float WIND_DIRECTION_TIME_MULTIPLIER
Definition WorldData.c:16
void CalculateWind(int newWeather, bool suddenChange, out float magnitude, out float direction)
int m_SameWeatherCnt
Definition WorldData.c:44
FileMode
Definition EnSystem.c:383
proto void CloseFile(FileHandle file)
Close the File.
proto FileHandle OpenFile(string name, FileMode mode)
Opens File.
proto void FPrintln(FileHandle file, void var)
Write to file and add new line.
const int IDC_MAIN_QUIT
Definition constants.c:144

Перекрестные ссылки CloseFile(), FPrintln(), g_Game, Weather::GetDynVolFogHeightBias(), Weather::GetFog(), GetGame(), Weather::GetOvercast(), Weather::GetRain(), Weather::GetWindDirection(), Weather::GetWindMagnitude(), IDC_MAIN_QUIT, m_Weather, OpenFile(), Math::RandomFloatInclusive(), Math::RandomInt(), Math::RandomIntInclusive(), Weather::SetDynVolFogHeightBias(), Weather::SetRainThresholds(), Weather::SetStorm(), Weather::SetWindMaximumSpeed() и Debug::WeatherLog().

Поля

◆ BAD_WEATHER

const int BAD_WEATHER = 3
protected

◆ CHERNARUS_ARTY_STRIKE_POS

const ref array<vector> CHERNARUS_ARTY_STRIKE_POS
staticprotected
Инициализатор
=
{
"-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"
}
23 {
24 "-500.00 165.00 5231.69",
25 "-500.00 300.00 9934.41",
26 "10406.86 192.00 15860.00",
27 "4811.75 370.00 15860.00",
28 "-500.00 453.00 15860.00"
29 };

◆ CLEAR_WEATHER

const int CLEAR_WEATHER = 1
protected

DEPRECATED (see WorldDataWeatherConstants)

◆ CLOUDY_WEATHER

const int CLOUDY_WEATHER = 2
protected

◆ COLD_AREA_TOOL_DMG_MODIF_DEF

const float COLD_AREA_TOOL_DMG_MODIF_DEF = 1
private

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

◆ m_BadWeatherChance

int m_BadWeatherChance
protected

◆ m_badWeatherChance

int m_badWeatherChance = m_BadWeatherChance
protected

◆ m_Chance

int m_Chance = 50
protected

◆ m_chance

int m_chance = m_Chance
protected

◆ m_ChoosenWeather

int m_ChoosenWeather = 1
protected

◆ m_choosenWeather

int m_choosenWeather = m_ChoosenWeather
protected

◆ m_ClearWeatherChance

int m_ClearWeatherChance
protected

◆ m_clearWeatherChance

int m_clearWeatherChance = m_ClearWeatherChance
protected

◆ m_CloudsTemperatureEffectModifier

float m_CloudsTemperatureEffectModifier
private

amount of °C reduced for each 100 meteres of height above water level

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

◆ m_DayTemperature

float m_DayTemperature = 10
protected

DEPRECATED

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

◆ m_DefaultPlayerRestrictedAreas

ref TStringArray m_DefaultPlayerRestrictedAreas
protected

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

◆ m_EnTempUpdated

bool m_EnTempUpdated
protected

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

◆ m_EnvironmentTemperature

◆ m_FiringPos

ref array<vector> m_FiringPos
protected

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

◆ m_IsSuddenChange

bool m_IsSuddenChange
protected

◆ m_LastWeather

int m_LastWeather = 0
protected

◆ m_lastWeather

int m_lastWeather = m_LastWeather
protected

◆ m_LiquidSettings

◆ m_MaxTemps

float m_MaxTemps[12]
protected

◆ m_MinTemps

float m_MinTemps[12]
protected

◆ m_NightTemperature

float m_NightTemperature = 6
protected

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

◆ m_Pollution

bool m_Pollution
protected

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

◆ m_SameWeatherCnt

int m_SameWeatherCnt = 0
protected

◆ m_sameWeatherCnt

int m_sameWeatherCnt = m_SameWeatherCnt
protected

◆ m_StepValue

int m_StepValue = 5
protected

◆ m_stepValue

int m_stepValue = m_StepValue
protected

◆ m_Sunrise_Jan

float m_Sunrise_Jan
protected

◆ m_Sunrise_Jul

float m_Sunrise_Jul
protected

◆ m_Sunset_Jan

float m_Sunset_Jan
protected

◆ m_Sunset_Jul

float m_Sunset_Jul
protected

◆ m_TemperaturePerHeightReductionModifier

float m_TemperaturePerHeightReductionModifier
private

directly accesible (defined/overriden in Init())

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

◆ m_Timer

float m_Timer
protected

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

◆ m_UniversalTemperatureSourceCapModifier

float m_UniversalTemperatureSourceCapModifier
protected

◆ m_Weather

◆ m_WeatherDefaultSettings

◆ m_WorldWindCoef

float m_WorldWindCoef
protected

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

◆ m_YieldBank

◆ OVERCAST_MAX_TIME

const int OVERCAST_MAX_TIME = 900
protected

◆ OVERCAST_MIN_TIME

const int OVERCAST_MIN_TIME = 600
protected

DEPRECATED (see WorldDataWeatherSettings)

◆ RAIN_THRESHOLD

const float RAIN_THRESHOLD = 0.6
protected

◆ RAIN_TIME_MAX

const int RAIN_TIME_MAX = 120
protected

◆ RAIN_TIME_MIN

const int RAIN_TIME_MIN = 60
protected

◆ SPAWN_CHANCE_CHOLERA_DEF

const float SPAWN_CHANCE_CHOLERA_DEF = 50
private

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

◆ STORM_THRESHOLD

const float STORM_THRESHOLD = 0.9
protected

◆ SUDDENCHANGE_LENGTH_MULTIPLIER

float SUDDENCHANGE_LENGTH_MULTIPLIER = 0.4
protected

◆ SUDDENCHANGE_TIME_MULTIPLIER

float SUDDENCHANGE_TIME_MULTIPLIER = 0.2
protected

how many % of environment temperature can be lowered by clouds

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

◆ WIND_DIRECTION_TIME_MULTIPLIER

float WIND_DIRECTION_TIME_MULTIPLIER = 0.05
protected

◆ WIND_MAGNITUDE_TIME_MULTIPLIER

float WIND_MAGNITUDE_TIME_MULTIPLIER = 0.1
protected

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