]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_violence.qc
Merge branch 'mirceakitsune/damage_effects' of git://de.git.xonotic.org/xonotic/xonot...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_violence.qc
index a6e73ba251b1132e343ab39ffac5bf21a1f81563..ba2426718a571ca706958e8de9b6c3ad94b35a71 100644 (file)
@@ -13,6 +13,9 @@ float Violence_GibSplash_SendEntity(entity to, float sf)
 // 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();
@@ -22,6 +25,13 @@ 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
+       if(self.classname == "body")
+               e.team = num_for_edict(self.owner);
+       else
+               e.team = num_for_edict(self);
+
        setorigin(e, org);
        e.velocity = dir;