X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fg_violence.qc;h=34d384c2833ad502a2c164992e2d68ac57481e35;hb=09bda77f4d4ee9c8b639c65af4e444b782123c23;hp=a6e73ba251b1132e343ab39ffac5bf21a1f81563;hpb=cb78214cf1252fa80df3490c0cd3d41bae72bbb8;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/g_violence.qc b/qcsrc/server/g_violence.qc index a6e73ba25..34d384c28 100644 --- a/qcsrc/server/g_violence.qc +++ b/qcsrc/server/g_violence.qc @@ -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,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;