-
- org = gettaginfo(self.owner, self.bone);
-
- // 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.
- entity head;
- for(head = world; (head = find(head, classname, "gib")); )
- {
- if(head.team == self.team)
- {
- if(autocvar_cl_damageeffect_gibs)
- {
- if(autocvar_cl_damageeffect_gibs_randomize >= random())
- pointparticles(self.dmgpartnum, head.origin, '0 0 0', 1);
- self.dmgtime = time + autocvar_cl_damageeffect_gibs;
- }
- foundgib = TRUE;
- }
- }
-
- if(foundgib || !autocvar_cl_damageeffect_player)