hedgewars/uGearsUtils.pas
changeset 10010 2a1483d91977
parent 9998 736015b847e3
child 10011 ead5e4b21671
--- 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)