]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
don't overemphasize direct hits
authorRudolf Polzer <divverent@alientrap.org>
Wed, 4 Jan 2012 12:48:26 +0000 (13:48 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 4 Jan 2012 12:48:26 +0000 (13:48 +0100)
qcsrc/client/damage.qc

index 86df995cc3283cc46065cffce629be026fd84206..5910dba3e41d13f4cf4636e34cf1983de9b9f5ef 100644 (file)
@@ -38,6 +38,8 @@ void Ent_DamageInfo(float isNew)
                        thisdmg = ((vlen (nearest - w_org) - bound(MIN_DAMAGEEXTRARADIUS, self.damageextraradius, MAX_DAMAGEEXTRARADIUS)) / rad);
                        if(thisdmg >= 1)
                                continue;
+                       if(thisdmg < 0)
+                               thisdmg = 0;
                        if(dmg)
                        {
                                thisdmg = dmg + (edge - dmg) * thisdmg;