From: Mircea Kitsune Date: Wed, 4 Jan 2012 14:59:32 +0000 (+0200) Subject: First part of bone-based damage effects: The origin of the effects is now a given... X-Git-Tag: xonotic-v0.6.0~110^2^2~73 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dbf4174c18e50013ef0a3d96092085d701c99408;p=xonotic%2Fxonotic-data.pk3dir.git First part of bone-based damage effects: The origin of the effects is now a given player bone, not the player's origin --- diff --git a/qcsrc/client/damage.qc b/qcsrc/client/damage.qc index a9e8d4cbd..eaa2fd4f9 100644 --- a/qcsrc/client/damage.qc +++ b/qcsrc/client/damage.qc @@ -241,6 +241,7 @@ void DamageInfo_Precache() .entity dmgent; .float dmgpartnum, dmgtime; .float lifetime; +.float bone; void DamageEffect_Think() { @@ -257,9 +258,9 @@ void DamageEffect_Think() } if(self.dmgtime > time) return; - org = getplayerorigin(self.team); - if(org == GETPLAYERORIGIN_ERROR) - return; + + org = gettaginfo(self.owner, self.bone); + //dprint(strcat(vtos(gettaginfo(self.owner, self.bone)), " --------\n")); // Scan the owner of all gibs in the world. If a gib owner is the same as the player we're applying // the effect to, it means our player is gibbed. Therefore, apply particles to the gibs instead. @@ -327,6 +328,8 @@ void DamageEffect(float dmg, float type, float specnum, float entnumber) entity e; e = spawn(); + e.owner = self; + e.bone = 0; e.classname = "damageeffect"; e.team = entnumber; e.dmgpartnum = particleeffectnum(effectnum);