]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix the bug causing ground impacts to show when hitting a player with hitscan weapons
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 26 Feb 2012 21:03:08 +0000 (23:03 +0200)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 26 Feb 2012 21:03:08 +0000 (23:03 +0200)
qcsrc/client/damage.qc

index 34c15837acc26fe3e9cade3ce1430bd218b9da87..d342738e99cc4212286065aef047d91a94479e4d 100644 (file)
@@ -113,7 +113,7 @@ void DamageEffect(vector hitorg, float dmg, float type, float specnum)
 
 void Ent_DamageInfo(float isNew)
 {
-       float dmg, rad, edge, thisdmg, forcemul, species;
+       float dmg, rad, edge, thisdmg, forcemul, species, isplayer;
        vector force, thisforce;
        entity oldself;
 
@@ -188,6 +188,9 @@ void Ent_DamageInfo(float isNew)
                        self.event_damage(thisdmg, w_deathtype, w_org, thisforce);
 
                DamageEffect(w_org, thisdmg, w_deathtype, species);
+
+               if(self.isplayermodel)
+                       isplayer = TRUE; // this impact damaged a player
        }
 
        self = oldself;
@@ -325,6 +328,7 @@ void Ent_DamageInfo(float isNew)
        
        // TODO spawn particle effects and sounds based on w_deathtype
        if(!DEATH_ISSPECIAL(w_deathtype))
+       if not(isplayer) // don't show ground impacts if a player was hit
        {
                float hitwep;