void Ent_DamageInfo(float isNew)
{
- float dmg, rad, edge, thisdmg, forcemul, species;
+ float dmg, rad, edge, thisdmg, forcemul, species, hitplayer;
vector force, thisforce;
entity oldself;
for(self = findradius(w_org, rad + MAX_DAMAGEEXTRARADIUS); self; self = self.chain)
{
+ // attached ents suck
+ if(self.tag_entity)
+ continue;
+
vector nearest = NearestPointOnBox(self, w_org);
if(rad)
{
self.event_damage(thisdmg, w_deathtype, w_org, thisforce);
DamageEffect(w_org, thisdmg, w_deathtype, species);
+
+ if(self.isplayermodel)
+ hitplayer = TRUE; // this impact damaged a player
}
self = oldself;
sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_MIN);
pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
break;
-
+
case DEATH_WAKIGUN:
sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM);
pointparticles(particleeffectnum("wakizashi_gun_impact"), self.origin, w_backoff * 1000, 1);
sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTN_MIN);
pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
break;
+ case DEATH_BUMB_GUN:
+ sound(self, CH_SHOTS, "weapons/fireball_impact2.wav", VOL_BASE, ATTN_NORM);
+ pointparticles(particleeffectnum("bigplasma_impact"), self.origin, w_backoff * 1000, 1);
+ break;
}
}
// TODO spawn particle effects and sounds based on w_deathtype
if(!DEATH_ISSPECIAL(w_deathtype))
+ if not(hitplayer && !rad) // don't show ground impacts for hitscan weapons if a player was hit
{
float hitwep;