]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Instead, send the entnum of the player from copied bodies on gib explosion.
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 3 Apr 2011 21:39:36 +0000 (00:39 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 3 Apr 2011 21:39:36 +0000 (00:39 +0300)
qcsrc/server/g_violence.qc

index cee0c28a68bf07aa97c9fc3db73b9c584fd77ed3..b7a417b4022b7edfe85a7ef98ca7338157382853 100644 (file)
@@ -26,7 +26,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
-       e.team = num_for_edict(self);
+
+       // 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;