MCPcopy Create free account
hub / github.com/ddnet/ddnet / BulletTrail

Method BulletTrail

src/game/client/components/effects.cpp:174–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174void CEffects::BulletTrail(vec2 Pos, float Alpha, float TimePassed)
175{
176 if(!m_Add100hz && TimePassed < 0.001f)
177 return;
178
179 CParticle p;
180 p.SetDefault();
181 p.m_Spr = SPRITE_PART_BALL;
182 p.m_Pos = Pos;
183 p.m_LifeSpan = random_float(0.25f, 0.5f);
184 p.m_StartSize = 8.0f;
185 p.m_EndSize = 0.0f;
186 p.m_Friction = 0.7f;
187 p.m_Color.a *= Alpha;
188 p.m_StartAlpha = Alpha;
189 GameClient()->m_Particles.Add(CParticles::GROUP_PROJECTILE_TRAIL, &p, TimePassed);
190}
191
192void CEffects::PlayerSpawn(vec2 Pos, float Alpha, float Volume)
193{

Callers 2

RenderProjectileMethod · 0.80
ReconstructSmokeTrailMethod · 0.80

Calls 3

random_floatFunction · 0.85
SetDefaultMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected