209 {
210 float now =
g_Game.GetTickTime();
211
213 return;
214
216
218 return;
219
221 if (!particleNames)
222 return;
223
225 if (!surfaceVariants)
226 return;
227
228 bool effectPlayed = false;
229
230 foreach (
string name : particleNames)
231 {
233
234 if (!data)
235 {
236 string errorMsg = "No such particles exists. Check to see if the name of the particle inside the ammo config is correct";
237 ErrorEx(
string.Format(
"Particle: '%1'",
name, errorMsg));
238 continue;
239 }
240
245
246 effectPlayed = true;
247 }
248
249 if (effectPlayed)
250 {
252 }
253
255 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
class DustKickupEffectDistanceData DustKickupParticleData
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
ParticleAutoDestroyFlags
Flags to pass to ParticleSource.SetParticleAutoDestroyFlags.
float m_TimeUntilNextEffect
const float EFFECT_COOLDOWN_MAX
const float EFFECT_COOLDOWN_MIN
vlaues for the cooldown are in seconds
array< string > DetermineParticles(string ammoType, float fraction, float depth)
Determines what particles should play based on the ammo type and distance of the weapon from the grou...
const float MAX_DISTANCE_FOR_EFFECT
ref map< string, ref map< string, ref DustKickupParticleData > > m_DustEffPaths
void PlaySoundEffect(DustKickupParams params)
override void PlayParticle(int particle_id=-1)
Method to tell the particle to start playing.
proto native void SetParticleAutoDestroyFlags(ParticleAutoDestroyFlags flags)
Enables the particle to automatically clean up itself when ending or stopping.