]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix slow push :P
authorRudolf Polzer <divverent@alientrap.org>
Mon, 28 Mar 2011 15:45:06 +0000 (17:45 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Mon, 28 Mar 2011 15:45:06 +0000 (17:45 +0200)
qcsrc/common/explosion_equation.qc

index 3a18e8010028f3c5c3b7b14a77b7aad5cac57c95..df71154be885faea83287a56d6a131da2746ca21 100644 (file)
@@ -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);
 }