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

Function particle_emit

source/src/renderparticles.cpp:545–556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

543}
544
545void particle_emit(int type, int *args, int basetime, int seed, const vec &p)
546{
547 if(type<0 || type>=MAXPARTYPES) return;
548 parttype &pt = parttypes[type];
549 if(pt.type==PT_FIREBALL) particle_fireball(type, p);
550 else if(pt.type==PT_FLASH || pt.type==PT_HUDFLASH)
551 {
552 if(lastmillis - basetime < args[0])
553 particle_flash(type, args[1]>0 ? args[1]/100.0f : 1.0f, seed%360, p);
554 }
555 else particle_splash(type, args[0], args[1], p);
556}
557
558void particle_flash(int type, float scale, float angle, const vec &p)
559{

Callers 1

loopiMethod · 0.85

Calls 3

particle_fireballFunction · 0.85
particle_flashFunction · 0.85
particle_splashFunction · 0.85

Tested by

no test coverage detected