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

Method reload

ogsr_engine/xrGame/CustomRocket.cpp:286–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286void CCustomRocket::reload(LPCSTR section)
287{
288 inherited::reload(section);
289 m_eState = eInactive;
290
291 m_bEnginePresent = !!pSettings->r_bool(section, "engine_present");
292 if (m_bEnginePresent)
293 {
294 m_dwEngineWorkTime = pSettings->r_u32(section, "engine_work_time");
295 m_fEngineImpulse = pSettings->r_float(section, "engine_impulse");
296 m_fEngineImpulseUp = pSettings->r_float(section, "engine_impulse_up");
297 }
298
299 m_bLightsEnabled = !!pSettings->r_bool(section, "lights_enabled");
300 if (m_bLightsEnabled)
301 {
302 sscanf(pSettings->r_string(section, "trail_light_color"), "%f,%f,%f", &m_TrailLightColor.r, &m_TrailLightColor.g, &m_TrailLightColor.b);
303 m_fTrailLightRange = pSettings->r_float(section, "trail_light_range");
304 }
305
306 if (pSettings->line_exist(section, "engine_particles"))
307 m_sEngineParticles = pSettings->r_string(section, "engine_particles");
308 if (pSettings->line_exist(section, "fly_particles"))
309 m_sFlyParticles = pSettings->r_string(section, "fly_particles");
310
311 if (pSettings->line_exist(section, "snd_fly_sound"))
312 {
313 m_flyingSound.create(pSettings->r_string(section, "snd_fly_sound"), st_Effect, sg_SourceType);
314 }
315}
316
317void CCustomRocket::Contact(const Fvector& pos, const Fvector& normal)
318{

Callers

nothing calls this directly

Calls 7

reloadFunction · 0.85
r_boolMethod · 0.80
line_existMethod · 0.80
r_u32Method · 0.45
r_floatMethod · 0.45
r_stringMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected