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

Function shoot

source/src/weapon.cpp:1673–1680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1671COMMANDF(setscope, "i", (int *on) { setscope(*on != 0); });
1672
1673void shoot(playerent *p, vec &targ)
1674{
1675 if(p->state!=CS_ALIVE) return;
1676 weapon *weap = p->weaponsel, *bweap = p->weapons[GUN_GRENADE];
1677 if(bweap->busy()) bweap->attack(targ); // continue ongoing nade action
1678 else bweap = NULL;
1679 if(weap && !p->weaponchanging && weap != bweap) weap->attack(targ);
1680}
1681
1682void checkakimbo()
1683{

Callers 2

updateworldFunction · 0.85
ShootEnemyMethod · 0.85

Calls 2

attackMethod · 0.80
busyMethod · 0.45

Tested by

no test coverage detected