287 {
289
290 string particle_file = "";
291 string cfg_path = "CfgAmmo " + ammoType + " muzzleFlashParticle";
292 if (
GetGame().ConfigGetText( cfg_path, particle_file))
293 particle_id = ParticleList.GetParticleIDByName(particle_file);
294
295
296
298 {
299 if (particle_file == "")
300 {
301 ErrorEx(
string.Format(
"Cannot spawn particle effect because item %1 is missing config parameter muzzleFlashParticle!", ammoType),
ErrorExSeverity.INFO);
302 }
303 else
304 {
305 particle_id = ParticleList.GetParticleIDByName(particle_file);
306
308 {
309 string devStr;
310 #ifdef DEVELOPER
311 devStr = " Make sure it's registered there and then rebuild Scripts and Graphics PBOs.";
312 #endif
313 ErrorEx(
string.Format(
"Cannot play particle effect with name %1 because no such file is registered in ParticleList.c!%2", particle_file, devStr));
315 }
316 }
317 }
318 else
319 {
321 }
322
324 }
proto native CGame GetGame()