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

Method splash

source/src/weapon.cpp:1134–1155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1132}
1133
1134void grenadeent::splash()
1135{
1136 particle_splash(PART_SPARK, 50, 300, o);
1137 particle_fireball(PART_FIREBALL, o);
1138 addscorchmark(o);
1139 adddynlight(NULL, o, 16, 200, 100, 255, 255, 224);
1140 adddynlight(NULL, o, 16, 600, 600, 192, 160, 128);
1141 if(owner == player1)
1142 {
1143 if(multiplayer(NULL)) accuracym[GUN_GRENADE].shots++;
1144 }
1145 else if(!m_botmode) return;
1146 int damage = guns[GUN_GRENADE].damage;
1147
1148 radialeffect(owner->type == ENT_BOT ? player1 : owner, o, damage, owner, GUN_GRENADE);
1149 loopv(players)
1150 {
1151 playerent *p = players[i];
1152 if(!p) continue;
1153 radialeffect(p, o, damage, owner, GUN_GRENADE);
1154 }
1155}
1156
1157void grenadeent::activate(const vec &from, const vec &vel)
1158{

Callers

nothing calls this directly

Calls 6

particle_splashFunction · 0.85
particle_fireballFunction · 0.85
addscorchmarkFunction · 0.85
adddynlightFunction · 0.85
multiplayerFunction · 0.85
radialeffectFunction · 0.85

Tested by

no test coverage detected