@@ -28,12 +28,6 @@ class CLensFlareDescriptor;
2828
2929#define DAY_LENGTH 86400 .f
3030
31- #ifdef INGAME_EDITOR
32- #define INGAME_EDITOR_VIRTUAL virtual
33- #else // #ifdef INGAME_EDITOR
34- #define INGAME_EDITOR_VIRTUAL
35- #endif // #ifdef INGAME_EDITOR
36-
3731// t-defs
3832class ENGINE_API CEnvModifier
3933{
@@ -69,7 +63,7 @@ class ENGINE_API CEnvAmbient
6963 float wind_blast_strength;
7064 Fvector wind_blast_direction;
7165
72- INGAME_EDITOR_VIRTUAL ~SEffect () {}
66+ virtual ~SEffect () {}
7367 };
7468 using EffectVec = xr_vector<SEffect*>;
7569
@@ -95,8 +89,8 @@ class ENGINE_API CEnvAmbient
9589 {
9690 return (m_sound_dist.x < m_sound_dist.y ) ? Random.randF (m_sound_dist.x , m_sound_dist.y ) : 0 ;
9791 }
98- INGAME_EDITOR_VIRTUAL ~SSndChannel () {}
99- INGAME_EDITOR_VIRTUAL sounds_type& sounds () { return m_sounds; }
92+ virtual ~SSndChannel () {}
93+ virtual sounds_type& sounds () { return m_sounds; }
10094 protected:
10195 xr_vector<ref_sound> m_sounds;
10296 };
@@ -114,16 +108,16 @@ class ENGINE_API CEnvAmbient
114108public:
115109 const shared_str& name () { return m_load_section; }
116110 const shared_str& get_ambients_config_filename () { return m_ambients_config_filename; }
117- INGAME_EDITOR_VIRTUAL void load (CInifile& ambients_config, CInifile& sound_channels_config,
111+ virtual void load (CInifile& ambients_config, CInifile& sound_channels_config,
118112 CInifile& effects_config, const shared_str& section);
119113 SEffect* get_rnd_effect () { return effects ().empty () ? 0 : effects ()[Random.randI (effects ().size ())]; }
120114 u32 get_rnd_effect_time () { return Random.randI (m_effect_period.x , m_effect_period.y ); }
121- INGAME_EDITOR_VIRTUAL SEffect* create_effect (CInifile& config, LPCSTR id);
122- INGAME_EDITOR_VIRTUAL SSndChannel* create_sound_channel (CInifile& config, LPCSTR id);
123- INGAME_EDITOR_VIRTUAL ~CEnvAmbient ();
115+ virtual SEffect* create_effect (CInifile& config, LPCSTR id);
116+ virtual SSndChannel* create_sound_channel (CInifile& config, LPCSTR id);
117+ virtual ~CEnvAmbient ();
124118 void destroy ();
125- INGAME_EDITOR_VIRTUAL EffectVec& effects () { return m_effects; }
126- INGAME_EDITOR_VIRTUAL SSndChannelVec& get_snd_channels () { return m_sound_channels; }
119+ virtual EffectVec& effects () { return m_effects; }
120+ virtual SSndChannelVec& get_snd_channels () { return m_sound_channels; }
127121};
128122
129123class ENGINE_API CEnvDescriptor
@@ -216,7 +210,7 @@ class ENGINE_API CEnvDescriptorMixer : public CEnvDescriptor
216210
217211public:
218212 CEnvDescriptorMixer (shared_str const & identifier);
219- INGAME_EDITOR_VIRTUAL void lerp (
213+ virtual void lerp (
220214 CEnvironment* parent, CEnvDescriptor& A, CEnvDescriptor& B, float f, CEnvModifier& M, float m_power);
221215 void clear ();
222216 void destroy ();
@@ -302,17 +296,17 @@ class ENGINE_API CEnvironment
302296 void SelectEnvs (float gt);
303297
304298 void UpdateAmbient ();
305- INGAME_EDITOR_VIRTUAL CEnvAmbient* AppendEnvAmb (const shared_str& sect);
299+ virtual CEnvAmbient* AppendEnvAmb (const shared_str& sect);
306300
307301 void Invalidate ();
308302
309303public:
310304 CEnvironment ();
311305
312- INGAME_EDITOR_VIRTUAL ~CEnvironment ();
306+ virtual ~CEnvironment ();
313307
314- INGAME_EDITOR_VIRTUAL void load ();
315- INGAME_EDITOR_VIRTUAL void unload ();
308+ virtual void load ();
309+ virtual void unload ();
316310
317311 void mods_load ();
318312 void mods_unload ();
@@ -348,9 +342,7 @@ class ENGINE_API CEnvironment
348342 void ED_Reload ();
349343 float GetGameTime () { return fGameTime ; }
350344#else // #ifdef _EDITOR
351- #ifdef INGAME_EDITOR
352345 float GetGameTime () { return fGameTime ; }
353- #endif // #ifdef INGAME_EDITOR
354346
355347 bool m_paused;
356348#endif // #ifdef _EDITOR
@@ -363,21 +355,21 @@ class ENGINE_API CEnvironment
363355 CInifile* m_thunderbolts_config;
364356
365357protected:
366- INGAME_EDITOR_VIRTUAL CEnvDescriptor* create_descriptor (shared_str const & identifier, CInifile* config);
367- INGAME_EDITOR_VIRTUAL void load_weathers ();
368- INGAME_EDITOR_VIRTUAL void load_weather_effects ();
369- INGAME_EDITOR_VIRTUAL void create_mixer ();
358+ virtual CEnvDescriptor* create_descriptor (shared_str const & identifier, CInifile* config);
359+ virtual void load_weathers ();
360+ virtual void load_weather_effects ();
361+ virtual void create_mixer ();
370362 void destroy_mixer ();
371363
372364 void load_level_specific_ambients ();
373365
374366public:
375- INGAME_EDITOR_VIRTUAL SThunderboltDesc* thunderbolt_description (CInifile& config, shared_str const & section);
376- INGAME_EDITOR_VIRTUAL SThunderboltCollection* thunderbolt_collection (
367+ virtual SThunderboltDesc* thunderbolt_description (CInifile& config, shared_str const & section);
368+ virtual SThunderboltCollection* thunderbolt_collection (
377369 CInifile* pIni, CInifile* thunderbolts, LPCSTR section);
378- INGAME_EDITOR_VIRTUAL SThunderboltCollection* thunderbolt_collection (
370+ virtual SThunderboltCollection* thunderbolt_collection (
379371 xr_vector<SThunderboltCollection*>& collection, shared_str const & id);
380- INGAME_EDITOR_VIRTUAL CLensFlareDescriptor* add_flare (
372+ virtual CLensFlareDescriptor* add_flare (
381373 xr_vector<CLensFlareDescriptor*>& collection, shared_str const & id);
382374
383375public:
@@ -391,8 +383,6 @@ class ENGINE_API CEnvironment
391383 float p_fog_color;
392384};
393385
394- #undef INGAME_EDITOR_VIRTUAL
395-
396386ENGINE_API extern Flags32 psEnvFlags;
397387ENGINE_API extern float psVisDistance;
398388
0 commit comments