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

Method _throw

source/src/weapon.cpp:1170–1184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1168}
1169
1170void grenadeent::_throw(const vec &from, const vec &vel)
1171{
1172 if(nadestate!=NS_ACTIVATED) return;
1173 nadestate = NS_THROWN;
1174 this->vel = vel;
1175 this->o = from;
1176 this->resetinterp();
1177 inwater = waterlevel > o.z;
1178 if(local)
1179 {
1180 addmsg(SV_THROWNADE, "ri7", int(o.x*DNF), int(o.y*DNF), int(o.z*DNF), int(vel.x*DNF), int(vel.y*DNF), int(vel.z*DNF), lastmillis-millis);
1181 audiomgr.playsound(S_GRENADETHROW, SP_HIGH);
1182 }
1183 else audiomgr.playsound(S_GRENADETHROW, owner);
1184}
1185
1186void grenadeent::moveoutsidebbox(const vec &direction, playerent *boundingbox)
1187{

Callers 2

attackfxMethod · 0.80
thrownadeMethod · 0.80

Calls 3

addmsgFunction · 0.85
resetinterpMethod · 0.80
playsoundMethod · 0.80

Tested by

no test coverage detected