X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fdamage.qc;h=57d4c5c0e7da66651f4280e8abdadabea0d6e072;hb=e1f5688a2d0b36249850a8d8ab4707da5796f1df;hp=51029396a299e46ce1270781b905ed7c9db99f25;hpb=6796c18deac69d942dfc65b88efb2a5d9b258608;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/damage.qc b/qcsrc/client/damage.qc index 51029396a..57d4c5c0e 100644 --- a/qcsrc/client/damage.qc +++ b/qcsrc/client/damage.qc @@ -30,13 +30,17 @@ void Ent_DamageInfo(float isNew) else forcemul = 1; - for(self = findradius(w_org, rad); self; self = self.chain) + for(self = findradius(w_org, rad + MAX_DAMAGEEXTRARADIUS); self; self = self.chain) { + vector p = NearestPointOnBox(self, w_org); + if(vlen(p - w_org) > rad + self.damageextraradius) + continue; + if(rad) { thisdmg = vlen(self.origin - w_org) / rad; if(thisdmg >= 1) - continue; + thisdmg = 1; if(dmg) { thisdmg = dmg + (edge - dmg) * thisdmg;