MCPcopy Create free account
hub / github.com/assaultcube/AC / particle_trail

Function particle_trail

source/src/renderparticles.cpp:599–612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

597VARP(maxtrail, 1, 500, 10000);
598
599void particle_trail(int type, int fade, const vec &s, const vec &e)
600{
601 vec v;
602 float d = e.dist(s, v);
603 int steps = clamp(int(d*2), 1, maxtrail);
604 v.div(steps);
605 vec p = s;
606 loopi(steps)
607 {
608 p.add(v);
609 vec tmp((float)(rnd(11)-5), (float)(rnd(11)-5), (float)(rnd(11)-5));
610 newparticle(p, tmp, rnd(fade)+fade, type);
611 }
612}
613
614void particle_fireball(int type, const vec &o)
615{

Callers 1

attackfxMethod · 0.85

Calls 1

distMethod · 0.80

Tested by

no test coverage detected