]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_violence.qc
Merge branch 'master' into Mario/monsters
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_violence.qc
index f5def6a7dd68e4dd9660d62f4a1d7811372509bc..34d384c2833ad502a2c164992e2d68ac57481e35 100644 (file)
@@ -25,6 +25,14 @@ void Violence_GibSplash_At(vector org, vector dir, float type, float amount, ent
        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.enemy);
+       else
+               e.team = num_for_edict(self);
+
        setorigin(e, org);
        e.velocity = dir;