X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fdamage.qc;h=162ef6a07eb17560ebf4ffeb4d7a6c745affdaae;hb=ae82f85be7a1ccc080e5ea620976a03c43eeb962;hp=f52b5f82a26c03d906752ee51eba23031adb85d5;hpb=b38e2bae0a50554f26bf5af1fbd0e70b97cc0c71;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/damage.qc b/qcsrc/client/damage.qc index f52b5f82a..162ef6a07 100644 --- a/qcsrc/client/damage.qc +++ b/qcsrc/client/damage.qc @@ -22,11 +22,7 @@ void DamageEffect_Think() return; } self.state = self.owner.csqcmodel_isdead; -#ifdef COMPAT_XON050_ENGINE - if(self.owner.isplayermodel && (self.owner.entnum == player_localentnum || self.owner.entnum == spectatee_status) && !autocvar_chase_active) -#else if(self.owner.isplayermodel && (self.owner.entnum == player_localentnum) && !autocvar_chase_active) -#endif return; // if we aren't using a third person camera, hide our own effects // now generate the particles @@ -80,23 +76,18 @@ void DamageEffect(vector hitorg, float dmg, float type, float specnum) } life = bound(autocvar_cl_damageeffect_lifetime_min, dmg * autocvar_cl_damageeffect_lifetime, autocvar_cl_damageeffect_lifetime_max); - specstr = species_prefix(specnum); - type = DEATH_WEAPONOF(type); - e = get_weaponinfo(type); - effectname = strcat("damage_", e.netname); + effectname = get_weaponinfo(DEATH_WEAPONOF(type)).netname; - // if damage was dealt with a bullet weapon, our effect is blood - // since blood is species dependent, include the species tag - if(type == WEP_SHOTGUN || type == WEP_MACHINEGUN || type == WEP_RIFLE) // WEAPONTODO: when we kill shells and bullets, what happens to this? + if(substring(effectname, strlen(effectname) - 5, 5) == "BLOOD") { if(self.isplayermodel) { - effectname = strcat(effectname, "_", specstr); - effectname = substring(effectname, 0, strlen(effectname) - 1); // remove the _ symbol at the end of the species tag + specstr = species_prefix(specnum); + specstr = substring(specstr, 0, strlen(specstr) - 1); + effectname = strreplace("BLOOD", specstr, effectname); } - else - return; // objects don't bleed + else { return; } // objects don't bleed } e = spawn(); @@ -350,6 +341,6 @@ void Ent_DamageInfo(float isNew) w_backoff = -1 * normalize(force); setorigin(self, w_org + w_backoff * 2); // for sound() calls - WEP_ACTION(hitwep, WR_IMPACTEFFECT); + if(!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SKY)) { WEP_ACTION(hitwep, WR_IMPACTEFFECT); } } }