move 0.01 to the end to avoid increase damage fail on small values like fire. thanks to hedgewars wiki for noting this for fire damage.
authornemo
Fri, 07 Jun 2013 14:44:34 -0400
changeset 9148 78c699d8fdfd
parent 9147 0ab57cdf9346
child 9149 6790f1938cd9
move 0.01 to the end to avoid increase damage fail on small values like fire. thanks to hedgewars wiki for noting this for fire damage.
hedgewars/uGearsUtils.pas
--- a/hedgewars/uGearsUtils.pas	Fri Jun 07 17:37:01 2013 +0200
+++ b/hedgewars/uGearsUtils.pas	Fri Jun 07 14:44:34 2013 -0400
@@ -183,9 +183,9 @@
 if (CurrentHedgehog <> nil) and CurrentHedgehog^.King then
     i:= _1_5;
 if (Gear^.Hedgehog <> nil) and (Gear^.Hedgehog^.King or (Gear^.Hedgehog^.Effects[heFrozen] > 0)) then
-    ModifyDamage:= hwRound(_0_01 * cDamageModifier * dmg * i * cDamagePercent * _0_5)
-else
-    ModifyDamage:= hwRound(_0_01 * cDamageModifier * dmg * i * cDamagePercent)
+    ModifyDamage:= hwRound(cDamageModifier * dmg * i * cDamagePercent * _0_5 * _0_01)
+else                                                                                
+    ModifyDamage:= hwRound(cDamageModifier * dmg * i * cDamagePercent * _0_01)
 end;
 
 procedure ApplyDamage(Gear: PGear; AttackerHog: PHedgehog; Damage: Longword; Source: TDamageSource);