From: Rudolf Polzer Date: Mon, 28 Mar 2011 15:45:06 +0000 (+0200) Subject: fix slow push :P X-Git-Tag: xonotic-v0.5.0~305^2~19 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1f8db89c74a15b103f35ef2510a14e455ecd28ef;p=xonotic%2Fxonotic-data.pk3dir.git fix slow push :P --- diff --git a/qcsrc/common/explosion_equation.qc b/qcsrc/common/explosion_equation.qc index 3a18e8010..df71154be 100644 --- a/qcsrc/common/explosion_equation.qc +++ b/qcsrc/common/explosion_equation.qc @@ -42,9 +42,8 @@ vector damage_explosion_calcpush(vector explosion_f, vector target_v, float spee if(speedfactor < 1) return explosion_f; - float m; - #if 0 + float m; // find m so that // speedfactor * (1 + e) * m / (1 + m) == 1 m = 1 / ((1 + 0) * speedfactor - 1); @@ -59,5 +58,5 @@ vector damage_explosion_calcpush(vector explosion_f, vector target_v, float spee (target_v + v) * (target_v + v))); return v; #endif - return explosion_f * explosion_calcpush_getmultiplier(explosion_f * speedfactor, target_v) * (1.0 / speedfactor); + return explosion_f * explosion_calcpush_getmultiplier(explosion_f * speedfactor, target_v); }