well. let's fix this at least - only apply to gears that are actually hedgehogs, not just ones associated with a hedgehog (which can be pretty much any gear since damage tracking was added)
authornemo
Fri, 17 Jan 2014 15:37:24 -0500
changeset 10010 2a1483d91977
parent 10009 88929358d2e1
child 10011 ead5e4b21671
well. let's fix this at least - only apply to gears that are actually hedgehogs, not just ones associated with a hedgehog (which can be pretty much any gear since damage tracking was added)
hedgewars/uGearsUtils.pas
--- a/hedgewars/uGearsUtils.pas	Sat Jan 18 00:10:33 2014 +0400
+++ b/hedgewars/uGearsUtils.pas	Fri Jan 17 15:37:24 2014 -0500
@@ -199,7 +199,8 @@
 i:= _1;
 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
+if (Gear^.Kind = gtHedgehog) and (Gear^.Hedgehog <> nil) and 
+   (Gear^.Hedgehog^.King or (Gear^.Hedgehog^.Effects[heFrozen] > 0)) then
     ModifyDamage:= hwRound(cDamageModifier * dmg * i * cDamagePercent * _0_5 * _0_01)
 else
     ModifyDamage:= hwRound(cDamageModifier * dmg * i * cDamagePercent * _0_01)