21 static int GetAmmoParticleID(
string ammoType)
26 if ( !m_AmmoParticles.Find(ammoType, particleID) )
29 string particleFileName;
30 GetGame().ConfigGetText(
string.Format(
"cfgAmmo %1 particle", ammoType), particleFileName);
33 if ( particleFileName !=
"" )
35 particleID =
ParticleList.GetParticleIDByName(particleFileName);
39 m_AmmoParticles.Insert(ammoType, particleID);
46 static bool PlayAmmoParticle(
string ammoType,
vector pos)
48 int particleID = GetAmmoParticleID(ammoType);
52 return ParticleManager.GetInstance().PlayInWorld(particleID, pos) != null;
68 static typename GetAmmoEffectTypename(
string ammoType)
73 if ( !m_AmmoEffects.Find(ammoType, typeName) )
77 GetGame().ConfigGetText(
string.Format(
"cfgAmmo %1 effect", ammoType), effectName);
80 if ( effectName !=
"" )
82 typeName = effectName.ToType();
86 m_AmmoEffects.Insert(ammoType, typeName);
93 static bool PlayAmmoEffect(
string ammoType,
vector pos)
95 typename typeName = GetAmmoEffectTypename(ammoType);
99 Effect eff = Effect.Cast(typeName.Spawn());
103 eff.SetAutodestroy(
true);
128 static void Cleanup()
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)