DayZ 1.24
Loading...
Searching...
No Matches
WorldData Class Reference

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

Collaboration diagram for WorldData:
[legend]

Protected Member Functions

void WorldData ()
 
void Init ()
 
float GetApproxSunriseTime (float monthday)
 
float GetApproxSunsetTime (float monthday)
 
float CalcBaseEnvironmentTemperature (float monthday, float daytime)
 
void UpdateBaseEnvTemperature (float timeslice)
 
float GetBaseEnvTemperature ()
 
float GetBaseEnvTemperatureExact (int month, int day, int hour, int minute)
 
float GetDayTemperature ()
 
float GetNightTemperature ()
 
bool WeatherOnBeforeChange (EWeatherPhenomenon type, float actual, float change, float time)
 
array< vectorGetArtyFiringPos ()
 
void BaseTempDebug (int month, int day)
 
override void Init ()
 
override bool WeatherOnBeforeChange (EWeatherPhenomenon type, float actual, float change, float time)
 
override void Init ()
 
override bool WeatherOnBeforeChange (EWeatherPhenomenon type, float actual, float change, float time)
 

Protected Attributes

float m_DayTemperature
 
float m_NightTemperature
 
Weather m_Weather
 
float m_EnvironmentTemperature
 
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
 
int m_clearWeatherChance = CLEAR_WEATHER_CHANCE
 
int m_badWeatherChance = BAD_WEATHER_CHANCE
 
int m_sameWeatherCnt = 0
 
int m_stepValue = 5
 
int m_chance = 50
 
int m_choosenWeather = 1
 
int m_lastWeather = 0
 

Static Protected Attributes

static const ref array< vectorCHERNARUS_ARTY_STRIKE_POS
 
static const ref array< vectorLIVONIA_ARTY_STRIKE_POS
 

Private Attributes

const float RAIN_THRESHOLD = 0.6
 
const float STORM_THRESHOLD = 0.9
 
const int OVERCAST_MIN_TIME = 600
 
const int OVERCAST_MAX_TIME = 900
 
const int RAIN_TIME_MIN = 60
 
const int RAIN_TIME_MAX = 120
 
const int CLEAR_WEATHER = 1
 
const int CLOUDY_WEATHER = 2
 
const int BAD_WEATHER = 3
 
const int CLEAR_WEATHER_CHANCE = 30
 
const int BAD_WEATHER_CHANCE = 80
 

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

Definition at line 17 of file WorldData.c.

18 {
19 Init();
20 }
void Init()
Definition WorldData.c:22

References Init().

Member Function Documentation

◆ BaseTempDebug()

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

Definition at line 142 of file WorldData.c.

143 {
144 Print("--------------------");
145 for (int i = 0; i < 24; i++)
146 {
147 for (int j = 0; j < 6; j++)
148 {
149 int minute = (j * 10);
150 Print(string.Format("%1:%2 %3", i, minute, GetBaseEnvTemperatureExact(month, day, i, minute)));
151 }
152 }
153 }
float GetBaseEnvTemperatureExact(int month, int day, int hour, int minute)
Definition WorldData.c:113
proto void Print(void var)
Prints content of variable to console/log.

References GetBaseEnvTemperatureExact(), and Print().

◆ CalcBaseEnvironmentTemperature()

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

Definition at line 51 of file WorldData.c.

52 {
56 float nightTime = 24.0 - dayLight;
59 if (tempArrayIndexToLerp >= 12)
68
70 {
71 if (daytime <= (approxSunrise + (dayLight * 0.75)))
72 return Math.Lerp(
75 ((daytime - approxSunrise) / (dayLight * 0.75)));
76 else
77 return Math.Lerp(
80 (((daytime - approxSunrise) - (dayLight * 0.75)) / (dayLight - (dayLight * 0.75))));
81 }
82 else
83 {
84 if ((daytime > approxSunset) && (daytime < 24))
85 return Math.Lerp(
88 ((daytime - approxSunset) / (24 - approxSunset)) / 2.0);
89 else
90 return Math.Lerp(
93 (((daytime + (24 - approxSunset)) / nightTime) / 2.0) + 0.5);
94 }
95 }
Definition EnMath.c:7
float GetApproxSunriseTime(float monthday)
Definition WorldData.c:37
float GetApproxSunsetTime(float monthday)
Definition WorldData.c:44
float m_MaxTemps[12]
Definition WorldData.c:9
float m_MinTemps[12]
Definition WorldData.c:10
static proto float Floor(float f)
Returns floor of value.
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.

References Math::AbsFloat(), Math::Floor(), GetApproxSunriseTime(), GetApproxSunsetTime(), Math::Lerp(), m_MaxTemps, and m_MinTemps.

Referenced by GetBaseEnvTemperatureExact(), and UpdateBaseEnvTemperature().

◆ GetApproxSunriseTime()

float WorldData::GetApproxSunriseTime ( float monthday)
inlineprotected

Definition at line 37 of file WorldData.c.

38 {
39 if (monthday <= 8.0)
40 return ((m_Sunrise_Jan - m_Sunrise_Jul) / (8 - 1)) * (1 - monthday) + m_Sunrise_Jan;
41 else
42 return (((monthday - 8) * (m_Sunrise_Jan - m_Sunrise_Jul)) / (13 - 8)) + m_Sunrise_Jul;
43 }
float m_Sunrise_Jan
Definition WorldData.c:11
float m_Sunrise_Jul
Definition WorldData.c:13

References m_Sunrise_Jan, and m_Sunrise_Jul.

Referenced by CalcBaseEnvironmentTemperature().

◆ GetApproxSunsetTime()

float WorldData::GetApproxSunsetTime ( float monthday)
inlineprotected

Definition at line 44 of file WorldData.c.

45 {
46 if (monthday <= 8.0)
47 return ((m_Sunset_Jan - m_Sunset_Jul) / (8 - 1)) * (1 - monthday) + m_Sunset_Jan;
48 else
49 return (((monthday - 8) * (m_Sunset_Jan - m_Sunset_Jul)) / (13 - 8)) + m_Sunset_Jul;
50 }
float m_Sunset_Jan
Definition WorldData.c:12
float m_Sunset_Jul
Definition WorldData.c:14

References m_Sunset_Jan, and m_Sunset_Jul.

Referenced by CalcBaseEnvironmentTemperature().

◆ GetArtyFiringPos()

array< vector > WorldData::GetArtyFiringPos ( )
inlineprotected

Definition at line 136 of file WorldData.c.

137 {
138 return m_FiringPos;
139 }
ref array< vector > m_FiringPos
Definition WorldData.c:15

References m_FiringPos.

◆ GetBaseEnvTemperature()

float WorldData::GetBaseEnvTemperature ( )
inlineprotected

Definition at line 109 of file WorldData.c.

110 {
112 }
float m_EnvironmentTemperature
Definition WorldData.c:7

References m_EnvironmentTemperature.

◆ GetBaseEnvTemperatureExact()

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

Definition at line 113 of file WorldData.c.

114 {
115 return CalcBaseEnvironmentTemperature(month + (day / 32.0), hour + (minute / 60.0));
116 }
float CalcBaseEnvironmentTemperature(float monthday, float daytime)
Definition WorldData.c:51

References CalcBaseEnvironmentTemperature().

Referenced by BaseTempDebug().

◆ GetDayTemperature()

float WorldData::GetDayTemperature ( )
inlineprotected

Definition at line 119 of file WorldData.c.

120 {
121 return m_DayTemperature;
122 }
float m_DayTemperature
Definition WorldData.c:4

References m_DayTemperature.

◆ GetNightTemperature()

float WorldData::GetNightTemperature ( )
inlineprotected

Definition at line 124 of file WorldData.c.

125 {
126 return m_NightTemperature;
127 }
float m_NightTemperature
Definition WorldData.c:5

References m_NightTemperature.

◆ Init() [1/3]

void WorldData::Init ( )
inlineprotected

Definition at line 22 of file WorldData.c.

23 {
24 m_DayTemperature = 10; // legacy, no longer used
25 m_NightTemperature = 6; // legacy, no longer used
26 m_Weather = g_Game.GetWeather();
28 m_Timer = 0.0;
29 m_Sunrise_Jan = 8.54;
30 m_Sunset_Jan = 15.52;
31 m_Sunrise_Jul = 3.26;
32 m_Sunset_Jul = 20.73;
33 m_MaxTemps = {3, 5, 7, 14, 19, 24, 26, 25, 21, 16, 10, 5};
34 m_MinTemps = {-3, -2, 0, 4, 9, 14, 18, 17, 12, 7, 4, 0};
35 }
DayZGame g_Game
Definition DayZGame.c:3528
float m_Timer
Definition WorldData.c:8
Weather m_Weather
Definition WorldData.c:6

References g_Game, m_DayTemperature, m_EnvironmentTemperature, m_MaxTemps, m_MinTemps, m_NightTemperature, m_Sunrise_Jan, m_Sunrise_Jul, m_Sunset_Jan, m_Sunset_Jul, m_Timer, and m_Weather.

Referenced by WorldData().

◆ Init() [2/3]

override void WorldData::Init ( )
inlineprotected

Definition at line 40 of file ChernarusPlus.c.

41 {
42 super.Init();
43
44 // new temperature curve settings
45 m_Sunrise_Jan = 8.54;
46 m_Sunset_Jan = 15.52;
47 m_Sunrise_Jul = 3.26;
48 m_Sunset_Jul = 20.73;
49
50 int tempIdx;
51 m_MinTemps = {-3, -2, 0, 4, 9, 14, 18, 17, 12, 7, 4, 0};
53 {
56 }
57
58 m_MaxTemps = {3, 5, 7, 14, 19, 24, 26, 25, 21, 16, 10, 5};
60 {
63 }
64
66 }
static array< float > GetEnvironmentMaxTemps()
static array< float > GetEnvironmentMinTemps()
static const ref array< vector > CHERNARUS_ARTY_STRIKE_POS

References Count, CfgGameplayHandler::GetEnvironmentMaxTemps(), and CfgGameplayHandler::GetEnvironmentMinTemps().

◆ Init() [3/3]

override void WorldData::Init ( )
inlineprotected

Definition at line 42 of file Enoch.c.

43 {
44 super.Init();
45
46 // new temperature curve settings
47 m_Sunrise_Jan = 8.4;
48 m_Sunset_Jan = 15.63;
49 m_Sunrise_Jul = 3.65;
50 m_Sunset_Jul = 20.35;
51
52 int tempIdx;
53 m_MinTemps = {-7, -7.4, -4.1, 1.5, 7, 11.3, 13.4, 13.1, 9.3, 5.3, 0.8, -3.6};
55 {
58 }
59
60 m_MaxTemps = {-2.5, -2.1, 2.3, 9, 15.5, 19.4, 20.9, 20.4, 16, 10.5, 4.2, 0.1};
62 {
65 }
66
68 }
static const ref array< vector > LIVONIA_ARTY_STRIKE_POS
Definition Enoch.c:31

References Count, CfgGameplayHandler::GetEnvironmentMaxTemps(), and CfgGameplayHandler::GetEnvironmentMinTemps().

◆ UpdateBaseEnvTemperature()

void WorldData::UpdateBaseEnvTemperature ( float timeslice)
inlineprotected

Definition at line 96 of file WorldData.c.

97 {
99 if (m_Timer > 30)
100 {
101 int year, month, day, hour, minute;
102 GetGame().GetWorld().GetDate(year, month, day, hour, minute);
104 m_Timer = 0;
105 }
106 }
proto native CGame GetGame()

References CalcBaseEnvironmentTemperature(), GetGame(), m_EnvironmentTemperature, and m_Timer.

◆ WeatherOnBeforeChange() [1/3]

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

Definition at line 129 of file WorldData.c.

130 {
131 // default behaviour is same like setting MissionWeather (in Weather) to true
132 return false;
133 }

◆ WeatherOnBeforeChange() [2/3]

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

Definition at line 68 of file ChernarusPlus.c.

69 {
70 int phmnTime = 5;
71 int phmnLength = 10;
72 float phmnValue = 0;
73
75
76 m_Weather.SetRainThresholds(0.0, 1.0, 60);
78 m_Weather.SetWindFunctionParams(0.1, 1.0, 20);
79
80 switch (type)
81 {
82 //-----------------------------------------------------------------------------------------------------------------------------
83 case EWeatherPhenomenon.OVERCAST:
84
85 //went something goes wrong choose some default random weather
89
90 //----
91 //calculate next weather
93
94 //--
96 {
97 m_clearWeatherChance -= (m_stepValue * m_sameWeatherCnt); //decrease the chance of the same weather
98 }
99
101 {
102 m_clearWeatherChance += (m_stepValue * m_sameWeatherCnt); //increase the chance of the better weather
103 //m_badWeatherChance += ( m_stepValue * m_sameWeatherCnt);
104 }
105
107 {
108 m_clearWeatherChance += m_stepValue; //increase the chance of the better weather slightly
109 m_badWeatherChance += ((m_stepValue * m_sameWeatherCnt) + m_stepValue); //decrease the chance of the same weather rapidly
110 }
111
112 //----
114 {
118 }
119 else if (m_chance > m_badWeatherChance)
120 {
124 }
125 else
126 {
130 }
131
134
137
138 //----
139 //set choosen weather
141 {
143
147 }
148
150 {
152
156 }
157
159 {
161
165 }
166
168
169 Debug.WeatherLog(string.Format("Chernarus::Weather::Overcast:: (%1) overcast: %2", g_Game.GetDayTime(), actual));
170 Debug.WeatherLog(string.Format("Chernarus::Weather::Overcast::Rain:: (%1) %2", g_Game.GetDayTime(), m_Weather.GetRain().GetActual()));
171
172 return true;
173
174 //-----------------------------------------------------------------------------------------------------------------------------
175 case EWeatherPhenomenon.RAIN:
176
177 float actualOvercast = m_Weather.GetOvercast().GetActual();
178
180 phmnValue = 0.2;
181 phmnTime = 90;
182 phmnLength = 30;
183
185 {
187 Debug.WeatherLog(string.Format("Chernarus::Weather::Rain::ForceEnd:: (%1) %2 -> 0", g_Game.GetDayTime(), actual));
188 return true;
189 }
190
192 {
195 phmnLength = 0;
196
198 Debug.WeatherLog(string.Format("Chernarus::Weather::Rain::ForceStorm:: (%1) %2 -> %3", g_Game.GetDayTime(), actual, phmnValue));
199 return true;
200 }
201
202 //make a differnce in "normal rain"
203 if (actualOvercast < 0.75)
204 {
205 if (m_chance < 30)
206 {
209 phmnLength = 0;
210 }
211 else if (m_chance < 60)
212 {
215 phmnLength = 0;
216 }
217 else if (m_chance < 80)
218 {
221 phmnLength = 0;
222 }
223 else //also have the chance to not have rain at all
224 {
225 phmnValue = 0;
227 phmnLength = 120;
228 }
229 }
230 else
231 {
232 if (m_chance < 25)
233 {
236 phmnLength = 0;
237 }
238 else if (m_chance < 50)
239 {
242 phmnLength = 0;
243 }
244 else if (m_chance < 75)
245 {
248 phmnLength = 0;
249 }
250 else //also have the chance to not have rain at all
251 {
252 phmnValue = 0;
254 phmnLength = 120;
255 }
256 }
257
259
260 Debug.WeatherLog(string.Format("Chernarus::Weather::Rain:: (%1) %2", g_Game.GetDayTime(), actual));
261
262 return true;
263
264 //-----------------------------------------------------------------------------------------------------------------------------
265 case EWeatherPhenomenon.FOG:
266
267 float fogMin = 0.0;
268 float fogMax = 0.15;
269 float fogTime = 1800.0;
270
271 float fogyMorning = Math.RandomFloatInclusive(0.0, 1.0);
272
273 if (fogyMorning > 0.85)
274 {
275 if ((g_Game.GetDayTime() > 4 && g_Game.GetDayTime() < 7))
276 {
277 fogMin = 0.10;
278 fogMax = 0.35;
279 fogTime = 300;
280 }
281 }
282
283 if (m_Weather.GetOvercast().GetActual() < 0.3)
284 {
285 fogMin = 0.0;
286 fogMax = 0.08;
287 fogTime = 900.0;
288 }
289
291
292 Debug.WeatherLog(string.Format("Chernarus::Weather::Fog:: (%1) %2", g_Game.GetDayTime(), actual));
293
294 return true;
295 }
296
297 return false;
298 }
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:278
proto native Fog GetFog()
Returns a fog phenomenon object.
proto native void SetStorm(float density, float threshold, float timeOut)
Sets the thunderstorm properties.
proto native void SetRainThresholds(float tMin, float tMax, float tTime)
Sets overcast threshold values for rain phenomena.
proto native void SetWindFunctionParams(float fnMin, float fnMax, float fnSpeed)
Sets function parameters that controls the wind behaviour (change in time).
proto native Rain GetRain()
Returns a rain phenomenon object.
proto native Overcast GetOvercast()
Returns an overcast phenomenon object.
proto native void SetWindMaximumSpeed(float maxSpeed)
Sets the maximal wind speed in metre per second.
const int BAD_WEATHER_CHANCE
const int BAD_WEATHER
int m_choosenWeather
const int OVERCAST_MIN_TIME
const float STORM_THRESHOLD
const int OVERCAST_MAX_TIME
const int CLEAR_WEATHER_CHANCE
int m_badWeatherChance
const int RAIN_TIME_MIN
int m_sameWeatherCnt
const int CLOUDY_WEATHER
int m_clearWeatherChance
const int RAIN_TIME_MAX
int m_lastWeather
const int CLEAR_WEATHER
const float RAIN_THRESHOLD
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:106
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].
Definition EnMath.c:54

References g_Game, Math::RandomFloatInclusive(), Math::RandomInt(), Math::RandomIntInclusive(), and Debug::WeatherLog().

◆ WeatherOnBeforeChange() [3/3]

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

Definition at line 70 of file Enoch.c.

71 {
72 int phmnTime = 5;
73 int phmnLength = 10;
74 float phmnValue = 0;
75
77
78 m_Weather.SetRainThresholds(0.0, 1.0, 60);
80 m_Weather.SetWindFunctionParams(0.1, 1.0, 20);
81
82 switch (type)
83 {
84 //-----------------------------------------------------------------------------------------------------------------------------
85 case EWeatherPhenomenon.OVERCAST:
86
87 //went something goes wrong choose some default random weather
91
92 //----
93 //calculate next weather
95
96 //--
98 {
99 m_clearWeatherChance -= (m_stepValue * m_sameWeatherCnt); //decrease the chance of the same weather
100 }
101
103 {
104 m_clearWeatherChance += (m_stepValue * m_sameWeatherCnt); //increase the chance of the better weather
106 }
107
109 {
110 m_clearWeatherChance += m_stepValue; //increase the chance of the better weather slightly
111 m_badWeatherChance += (m_stepValue * m_sameWeatherCnt); //decrease the chance of the same weather
112 }
113
114 //----
116 {
120 }
121 else if (m_chance > m_badWeatherChance)
122 {
126 }
127 else
128 {
132 }
133
136
139
140 //----
141 //set choosen weather
143 {
145
149 }
150
152 {
154
158 }
159
161 {
163
167 }
168
170
171 Debug.WeatherLog(string.Format("Enoch::Weather::Overcast:: (%1) overcast: %2", g_Game.GetDayTime(), actual));
172 Debug.WeatherLog(string.Format("Enoch::Weather::Overcast::Rain:: (%1) %2", g_Game.GetDayTime(), m_Weather.GetRain().GetActual()));
173
174 return true;
175
176 //-----------------------------------------------------------------------------------------------------------------------------
177 case EWeatherPhenomenon.RAIN:
178 float actualOvercast = m_Weather.GetOvercast().GetActual();
179
181 phmnValue = 0.2;
182 phmnTime = 90;
183 phmnLength = 30;
184
186 {
188 Debug.WeatherLog(string.Format("Enoch::Weather::Rain::ForceEnd:: (%1) %2 -> 0", g_Game.GetDayTime(), actual));
189 return true;
190 }
191
193 {
196 phmnLength = 0;
197
199 Debug.WeatherLog(string.Format("Enoch::Weather::Rain::ForceStorm:: (%1) %2 -> %3", g_Game.GetDayTime(), actual, phmnValue));
200 return true;
201 }
202
203 //make a differnce in "normal rain"
204 if (actualOvercast < 0.75)
205 {
206 if (m_chance < 30)
207 {
210 phmnLength = 0;
211 }
212 else if (m_chance < 60)
213 {
216 phmnLength = 0;
217 }
218 else if (m_chance < 85)
219 {
222 phmnLength = 0;
223 }
224 else //also have the chance to not have rain at all
225 {
226 phmnValue = 0;
228 phmnLength = 120;
229 }
230 }
232 {
233 if (m_chance < 15)
234 {
237 phmnLength = 0;
238 }
239 else if (m_chance < 50)
240 {
243 phmnLength = 0;
244 }
245 else if (m_chance < 90)
246 {
249 phmnLength = 0;
250 }
251 else //also have the chance to not have rain at all
252 {
253 phmnValue = 0;
255 phmnLength = 120;
256 }
257 }
258 else
259 {
260 if (m_chance < 50)
261 {
264 phmnLength = 0;
265 }
266 else
267 {
270 phmnLength = 0;
271 }
272 }
273
275
276 Debug.WeatherLog(string.Format("Enoch::Weather::Rain:: (%1) %2", g_Game.GetDayTime(), actual));
277 return true;
278
279 //-----------------------------------------------------------------------------------------------------------------------------
280 case EWeatherPhenomenon.FOG:
281 int year, month, day, hour, minute;
282 GetGame().GetWorld().GetDate(year, month, day, hour, minute);
283 if ((hour >= 1) && (hour <= 5))
284 m_Weather.GetFog().Set(0.1, 1800, 0);
285 else
286 m_Weather.GetFog().Set(0.0, 1800, 0);
287
288 Debug.WeatherLog(string.Format("Enoch::Weather::Fog:: (%1) %2", g_Game.GetDayTime(), actual));
289
290 return true;
291 }
292 return false;
293 }

References g_Game, GetGame(), Math::RandomFloatInclusive(), Math::RandomInt(), Math::RandomIntInclusive(), and Debug::WeatherLog().

Member Data Documentation

◆ BAD_WEATHER

const int WorldData::BAD_WEATHER = 3
private

Definition at line 15 of file ChernarusPlus.c.

◆ BAD_WEATHER_CHANCE

const int WorldData::BAD_WEATHER_CHANCE = 80
private

Definition at line 18 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 32 of file ChernarusPlus.c.

32 {
33 "-500.00 165.00 5231.69",
34 "-500.00 300.00 9934.41",
35 "10406.86 192.00 15860.00",
36 "4811.75 370.00 15860.00",
37 "-500.00 453.00 15860.00"
38 };

◆ CLEAR_WEATHER

const int WorldData::CLEAR_WEATHER = 1
private

Definition at line 13 of file ChernarusPlus.c.

◆ CLEAR_WEATHER_CHANCE

const int WorldData::CLEAR_WEATHER_CHANCE = 30
private

Definition at line 17 of file ChernarusPlus.c.

◆ CLOUDY_WEATHER

const int WorldData::CLOUDY_WEATHER = 2
private

Definition at line 14 of file ChernarusPlus.c.

◆ LIVONIA_ARTY_STRIKE_POS

const ref array<vector> WorldData::LIVONIA_ARTY_STRIKE_POS
staticprotected
Initial value:
= {
"7440.00 417.00 -500.00",
"-500.00 276.00 5473.00",
"-500.00 265.00 9852.00",
"4953.00 240.00 13300.00",
"9620.00 188.00 13300.00",
"13300.00 204.00 10322.00",
"13300.00 288.00 6204.00",
"13300.00 296.00 -500.00"
}

Definition at line 31 of file Enoch.c.

31 {
32 "7440.00 417.00 -500.00",
33 "-500.00 276.00 5473.00",
34 "-500.00 265.00 9852.00",
35 "4953.00 240.00 13300.00",
36 "9620.00 188.00 13300.00",
37 "13300.00 204.00 10322.00",
38 "13300.00 288.00 6204.00",
39 "13300.00 296.00 -500.00"
40 };

◆ m_badWeatherChance

int WorldData::m_badWeatherChance = BAD_WEATHER_CHANCE
protected

Definition at line 22 of file ChernarusPlus.c.

◆ m_chance

int WorldData::m_chance = 50
protected

Definition at line 26 of file ChernarusPlus.c.

◆ m_choosenWeather

int WorldData::m_choosenWeather = 1
protected

Definition at line 28 of file ChernarusPlus.c.

◆ m_clearWeatherChance

int WorldData::m_clearWeatherChance = CLEAR_WEATHER_CHANCE
protected

Definition at line 20 of file ChernarusPlus.c.

◆ m_DayTemperature

float WorldData::m_DayTemperature
protected

Definition at line 4 of file WorldData.c.

Referenced by GetDayTemperature(), and Init().

◆ m_EnvironmentTemperature

float WorldData::m_EnvironmentTemperature
protected

Definition at line 7 of file WorldData.c.

Referenced by GetBaseEnvTemperature(), Init(), and UpdateBaseEnvTemperature().

◆ m_FiringPos

ref array<vector> WorldData::m_FiringPos
protected

Definition at line 15 of file WorldData.c.

Referenced by GetArtyFiringPos().

◆ m_lastWeather

int WorldData::m_lastWeather = 0
protected

Definition at line 29 of file ChernarusPlus.c.

◆ m_MaxTemps

float WorldData::m_MaxTemps[12]
protected

Definition at line 9 of file WorldData.c.

Referenced by CalcBaseEnvironmentTemperature(), and Init().

◆ m_MinTemps

float WorldData::m_MinTemps[12]
protected

Definition at line 10 of file WorldData.c.

Referenced by CalcBaseEnvironmentTemperature(), and Init().

◆ m_NightTemperature

float WorldData::m_NightTemperature
protected

Definition at line 5 of file WorldData.c.

Referenced by GetNightTemperature(), and Init().

◆ m_sameWeatherCnt

int WorldData::m_sameWeatherCnt = 0
protected

Definition at line 24 of file ChernarusPlus.c.

◆ m_stepValue

int WorldData::m_stepValue = 5
protected

Definition at line 25 of file ChernarusPlus.c.

◆ m_Sunrise_Jan

float WorldData::m_Sunrise_Jan
protected

Definition at line 11 of file WorldData.c.

Referenced by GetApproxSunriseTime(), and Init().

◆ m_Sunrise_Jul

float WorldData::m_Sunrise_Jul
protected

Definition at line 13 of file WorldData.c.

Referenced by GetApproxSunriseTime(), and Init().

◆ m_Sunset_Jan

float WorldData::m_Sunset_Jan
protected

Definition at line 12 of file WorldData.c.

Referenced by GetApproxSunsetTime(), and Init().

◆ m_Sunset_Jul

float WorldData::m_Sunset_Jul
protected

Definition at line 14 of file WorldData.c.

Referenced by GetApproxSunsetTime(), and Init().

◆ m_Timer

float WorldData::m_Timer
protected

Definition at line 8 of file WorldData.c.

Referenced by Init(), and UpdateBaseEnvTemperature().

◆ m_Weather

Weather WorldData::m_Weather
protected

Definition at line 6 of file WorldData.c.

Referenced by Init().

◆ OVERCAST_MAX_TIME

const int WorldData::OVERCAST_MAX_TIME = 900
private

Definition at line 8 of file ChernarusPlus.c.

◆ OVERCAST_MIN_TIME

const int WorldData::OVERCAST_MIN_TIME = 600
private

Definition at line 7 of file ChernarusPlus.c.

◆ RAIN_THRESHOLD

const float WorldData::RAIN_THRESHOLD = 0.6
private

Definition at line 4 of file ChernarusPlus.c.

◆ RAIN_TIME_MAX

const int WorldData::RAIN_TIME_MAX = 120
private

Definition at line 11 of file ChernarusPlus.c.

◆ RAIN_TIME_MIN

const int WorldData::RAIN_TIME_MIN = 60
private

Definition at line 10 of file ChernarusPlus.c.

◆ STORM_THRESHOLD

const float WorldData::STORM_THRESHOLD = 0.9
private

Definition at line 5 of file ChernarusPlus.c.


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