| 284 | } |
| 285 | |
| 286 | void 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 | |
| 317 | void CCustomRocket::Contact(const Fvector& pos, const Fvector& normal) |
| 318 | { |