]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_common.qc
Merge branch 'master' into fruitiex/fruitbalance
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_common.qc
index 8f2de4e8ce27b777624ea583860d081df599e830..4427320586988352ab039c04810e2fbeeced5fdf 100644 (file)
@@ -270,7 +270,7 @@ float W_BallisticBullet_LeaveSolid(entity e, vector vel, float constant)
 
        self.W_BallisticBullet_LeaveSolid_origin = trace_endpos;
 
-       dst = vlen(trace_endpos - self.origin);
+       dst = max(cvar("g_ballistics_mindistance"), vlen(trace_endpos - self.origin));
        // E(s) = E0 - constant * s, constant = area of bullet circle * material constant / mass
        Es_m = E0_m - constant * dst;
        if(Es_m <= 0)