// TODO maybe convert this to a TE?
void Violence_GibSplash_At(vector org, vector dir, float type, float amount, entity gibowner, entity attacker)
{
+ if(g_cts) // no gibs in CTS
+ return;
+
entity e;
e = spawn();
if(!sound_allowed(MSG_BROADCAST, gibowner) || !sound_allowed(MSG_BROADCAST, attacker))
e.state |= 0x40; // "silence" bit
e.state |= 8 * self.species; // gib type, ranges from 0 to 15
+
+ // if this is a copied dead body, send the num of its player instead
+ // TODO: remove this field, read from model txt files
+ if(self.classname == "body")
+ e.team = num_for_edict(self.owner);
+ else
+ e.team = num_for_edict(self);
+
setorigin(e, org);
e.velocity = dir;