.entity dmgent;
.float dmgpartnum, dmgtime;
.float lifetime;
-.float bone;
void DamageEffect_Think()
{
return; // if we aren't in third person mode, hide own damage effect
// Now apply the effect to the player
- org = gettaginfo(self.owner, self.bone);
+ org = gettaginfo(self, 0);
pointparticles(self.dmgpartnum, org, '0 0 0', 1);
self.dmgtime = time + autocvar_cl_damageeffect;
}
}
float closest;
- for(i = 1; gettaginfo(self, i); i++)
+ for(i = 0; gettaginfo(self, i); i++)
{
// go through all tags on the player model, choose the one closest to the damage origin
if(!closest || vlen(hitorg - gettaginfo(self, i)) <= vlen(hitorg - gettaginfo(self, closest)))
closest = i;
}
+ gettaginfo(self, closest); // set gettaginfo_name
+
e = spawn();
- e.owner = self;
- e.bone = closest;
+ setmodel(e, "models/null.md3");
+ setattachment(e, self, gettaginfo_name);
e.classname = "damageeffect";
e.team = entnumber;
e.dmgpartnum = particleeffectnum(effectnum);
void Ent_GibSplash(float isNew)
{
- float amount, type, specnum, entnumber;
+ float amount, type, specnum;
vector org, vel;
string specstr;
float issilent;
const float RF_FULLBRIGHT = 256;
const float RF_NOSHADOW = 512;
float RF_DYNAMICMODELLIGHT = 8192;
+
+float gettaginfo_parent;
+string gettaginfo_name;
+vector gettaginfo_offset;
+vector gettaginfo_forward;
+vector gettaginfo_right;
+vector gettaginfo_up;