MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / create_effect

Method create_effect

ogsr_engine/xr_3da/Environment_misc.cpp:211–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211CEnvAmbient::SEffect* CEnvAmbient::create_effect(CInifile& config, LPCSTR sect)
212{
213 SEffect* result = xr_new<SEffect>();
214 result->life_time = iFloor(config.r_float(sect, "life_time") * 1000.f);
215 result->m_load_section = sect;
216
217 result->particles = config.r_string(sect, "particles");
218 VERIFY(result->particles.size());
219#pragma todo("SIMP: Пересмотреть это! Пока убрал метод CreateAmbientParticle, в xrGame по этой части правки не вносились.") //
220 //g_pGamePersistent->CreateAmbientParticle(result);
221
222 result->offset = config.r_fvector3(sect, "offset");
223 result->wind_gust_factor = config.r_float(sect, "wind_gust_factor");
224
225 if (config.line_exist(sect, "sound"))
226 result->sound.create(config.r_string(sect, "sound"), st_Effect, sg_SourceType);
227
228 if (config.line_exist(sect, "wind_blast_strength"))
229 {
230 result->wind_blast_strength = config.r_float(sect, "wind_blast_strength");
231 result->wind_blast_direction.setHP(deg2rad(config.r_float(sect, "wind_blast_longitude")), 0.f);
232 result->wind_blast_in_time = config.r_float(sect, "wind_blast_in_time");
233 result->wind_blast_out_time = config.r_float(sect, "wind_blast_out_time");
234
235 return (result);
236 }
237
238 result->wind_blast_strength = 0.f;
239 result->wind_blast_direction.set(0.f, 0.f, 1.f);
240 result->wind_blast_in_time = 0.f;
241 result->wind_blast_out_time = 0.f;
242
243 return (result);
244}
245
246CEnvAmbient::SSndChannel* CEnvAmbient::create_sound_channel(CInifile& config, LPCSTR id)
247{

Callers

nothing calls this directly

Calls 9

deg2radFunction · 0.85
line_existMethod · 0.80
setHPMethod · 0.80
r_floatMethod · 0.45
r_stringMethod · 0.45
sizeMethod · 0.45
r_fvector3Method · 0.45
createMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected