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

Method thrownade

source/src/weapon.cpp:1310–1318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1308}
1309
1310void grenades::thrownade()
1311{
1312 if(!inhandnade) return;
1313 const float speed = cosf(RAD*owner->pitch);
1314 vec lvel(sinf(RAD*owner->yaw)*speed, -cosf(RAD*owner->yaw)*speed, sinf(RAD*owner->pitch));
1315 lvel.mul(1.5f);
1316 vec uvel(int(lvel.x*DNF)/DNF,int(lvel.y*DNF)/DNF,int(lvel.z*DNF)/DNF); // force universal granularity
1317 thrownade(uvel);
1318}
1319
1320void grenades::thrownade(const vec &vel)
1321{

Callers

nothing calls this directly

Calls 5

updatelastactionFunction · 0.85
selectweaponFunction · 0.85
mulMethod · 0.80
moveoutsidebboxMethod · 0.80
_throwMethod · 0.80

Tested by

no test coverage detected