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

Method attackfx

source/src/weapon.cpp:1261–1277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1259}
1260
1261void grenades::attackfx(const vec &from, const vec &vel, int millis) // other player's grenades
1262{
1263 throwmillis = lastmillis-millis;
1264 cookingmillis = millis;
1265 if(millis == 0 || millis == -1)
1266 {
1267 state = GST_INHAND;
1268 audiomgr.playsound(S_GRENADEPULL, owner);
1269 }
1270 else if(millis > 0) // throw
1271 {
1272 grenadeent *g = new grenadeent(owner, millis);
1273 state = GST_THROWING;
1274 bounceents.add(g);
1275 g->_throw(from, vel);
1276 }
1277}
1278
1279int grenades::modelanim()
1280{

Callers 1

parsemessagesFunction · 0.80

Calls 11

addbulletholeFunction · 0.85
addshotlineFunction · 0.85
particle_splashFunction · 0.85
adddynlightFunction · 0.85
particle_trailFunction · 0.85
playsoundMethod · 0.80
_throwMethod · 0.80
squareddistMethod · 0.80
loopiFunction · 0.70
loopkFunction · 0.70
addMethod · 0.45

Tested by

no test coverage detected