| 209 | } |
| 210 | |
| 211 | CEnvAmbient::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 | |
| 246 | CEnvAmbient::SSndChannel* CEnvAmbient::create_sound_channel(CInifile& config, LPCSTR id) |
| 247 | { |
nothing calls this directly
no test coverage detected