]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Tweak the Inferno burn time formula for correctness
authorTimePath <andrew.hardaker1995@gmail.com>
Tue, 10 Feb 2015 10:08:30 +0000 (21:08 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Tue, 10 Feb 2015 10:08:30 +0000 (21:08 +1100)
qcsrc/server/mutators/mutator_buffs.qc

index 9ab079ce905d1027ae027842a66cff85003d1eb5..0a74d7f390a7af48c1527f617e9c9e6568a1c973 100644 (file)
@@ -375,8 +375,7 @@ void buff_Vengeance_DelayedDamage()
 
 float buff_Inferno_CalculateTime(float x, float offset_x, float offset_y, float intersect_x, float intersect_y, float base)
 {
-       float f = (x - offset_x) / intersect_x;
-       return offset_y + (intersect_y - offset_y) * logn((base - 1) * (f + 1), base);
+       return offset_y + (intersect_y - offset_y) * logn(((x - offset_x) * ((base - 1) / intersect_x)) + 1, base);
 }
 
 MUTATOR_HOOKFUNCTION(buffs_PlayerDamage_Calculate)