|
10 | 10 | #include "Common/object_broker.h" |
11 | 11 | #include "Common/LevelGameDef.h" |
12 | 12 |
|
| 13 | +#include "Common/Config.hpp" |
| 14 | + |
13 | 15 | void CEnvModifier::load(IReader* fs, u32 version) |
14 | 16 | { |
15 | 17 | use_flags.one(); |
@@ -218,6 +220,10 @@ CEnvDescriptor::CEnvDescriptor(shared_str const& identifier) : m_identifier(iden |
218 | 220 | m_fSunShaftsIntensity = 0; |
219 | 221 | m_fWaterIntensity = 1; |
220 | 222 |
|
| 223 | +#ifdef TREE_WIND_EFFECT |
| 224 | + m_fTreeAmplitudeIntensity = 0.01; |
| 225 | +#endif |
| 226 | + |
221 | 227 | lens_flare_id = ""; |
222 | 228 | tb_id = ""; |
223 | 229 |
|
@@ -295,6 +301,11 @@ void CEnvDescriptor::load(CEnvironment& environment, CInifile& config) |
295 | 301 | if (config.line_exist(m_identifier.c_str(), "water_intensity")) |
296 | 302 | m_fWaterIntensity = config.r_float(m_identifier.c_str(), "water_intensity"); |
297 | 303 |
|
| 304 | +#ifdef TREE_WIND_EFFECT |
| 305 | + if (config.line_exist(m_identifier.c_str(), "tree_amplitude_intensity")) |
| 306 | + m_fTreeAmplitudeIntensity = config.r_float(m_identifier.c_str(), "tree_amplitude_intensity"); |
| 307 | +#endif |
| 308 | + |
298 | 309 | C_CHECK(clouds_color); |
299 | 310 | C_CHECK(sky_color); |
300 | 311 | C_CHECK(fog_color); |
@@ -436,6 +447,10 @@ void CEnvDescriptorMixer::lerp( |
436 | 447 | m_fSunShaftsIntensity = fi * A.m_fSunShaftsIntensity + f * B.m_fSunShaftsIntensity; |
437 | 448 | m_fWaterIntensity = fi * A.m_fWaterIntensity + f * B.m_fWaterIntensity; |
438 | 449 |
|
| 450 | +#ifdef TREE_WIND_EFFECT |
| 451 | + m_fTreeAmplitudeIntensity = fi * A.m_fTreeAmplitudeIntensity + f * B.m_fTreeAmplitudeIntensity; |
| 452 | +#endif |
| 453 | + |
439 | 454 | // colors |
440 | 455 | //. sky_color.lerp (A.sky_color,B.sky_color,f).add(Mdf.sky_color).mul(modif_power); |
441 | 456 | sky_color.lerp(A.sky_color, B.sky_color, f); |
|
0 commit comments