self.nextthink = time;
float foundgib;
- entity entcs;
+ vector org;
if(time >= self.lifetime)
{
}
if(self.dmgtime > time)
return;
- entcs = entcs_receiver[self.team];
- if(!entcs)
+ org = getplayerorigin(self.team);
+ if(org == GETPLAYERORIGIN_ERROR)
return;
// Scan the owner of all gibs in the world. If a gib owner is the same as the player we're applying
return; // if we aren't in third person mode, hide own damage effect
// Now apply the effect to actual players
- pointparticles(self.dmgpartnum, entcs.origin, '0 0 0', 1);
+ pointparticles(self.dmgpartnum, org, '0 0 0', 1);
self.dmgtime = time + autocvar_cl_damageeffect_player;
}
{
entity o;
o = self.owner;
- //if(o.deadflag != DEAD_NO) // allow sending entcs for dead players, for damage effects to work. To be decided!
- // return FALSE;
+ if(o.deadflag != DEAD_NO)
+ return FALSE;
if(o.classname != "player")
return FALSE;
- //if(other == o) // allow sending entcs for self, for damage effects to work. To be decided!
- // return FALSE;
+ if(other == o)
+ return FALSE;
if(other.classname == "player")
if(!teamplay || o.team != other.team)
- //if not (radar_showennemies)
- if not (checkpvs(other.origin + other.view_ofs, o)) // allow sending entcs for enemies in view, for damage effects to work. To be decided!
+ if not (radar_showennemies)
return FALSE;
return TRUE;
}