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

Function radialeffect

source/src/weapon.cpp:650–661  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

648}
649
650void radialeffect(playerent *o, vec &v, int qdam, playerent *at, int gun)
651{
652 if(o->state!=CS_ALIVE) return;
653 vec dir;
654 float dist = expdist(o, dir, v);
655 if(dist<EXPDAMRAD)
656 {
657 if(at == player1 && o != player1 && multiplayer(NULL)) accuracym[gun].hits += 1.0f-(float)dist/EXPDAMRAD;
658 int damage = (int)(qdam*(1-dist/EXPDAMRAD));
659 hit(damage, o, at, dir, gun, true, int(dist*DMF));
660 }
661}
662
663vector<bounceent *> bounceents;
664

Callers 2

splashMethod · 0.85
loopvFunction · 0.85

Calls 3

expdistFunction · 0.85
multiplayerFunction · 0.85
hitFunction · 0.85

Tested by

no test coverage detected