Graves should not be kicked for EXPLDoNotTouchAny
authornemo
Sun, 22 Dec 2013 13:44:28 -0500
changeset 9814 c740c865294d
parent 9813 4132b0bfcac5
child 9815 d4621fb76284
Graves should not be kicked for EXPLDoNotTouchAny
hedgewars/uGearsUtils.pas
--- a/hedgewars/uGearsUtils.pas	Sun Dec 22 08:37:10 2013 -0500
+++ b/hedgewars/uGearsUtils.pas	Sun Dec 22 13:44:28 2013 -0500
@@ -158,19 +158,20 @@
                             end;
 
                         end;
-                gtGrave: begin
+                gtGrave: if Mask and EXPLDoNotTouchAny = 0 then
 // Run the calcs only once we know we have a type that will need damage
-                        tdX:= Gear^.X-fX;
-                        tdY:= Gear^.Y-fY;
-                        if LongInt(tdX.Round + tdY.Round + 2) < dmgBase then
-                            dmg:= dmgBase - hwRound(Distance(tdX, tdY));
-                        if dmg > 1 then
                             begin
-                            dmg:= ModifyDamage(min(dmg div 2, Radius), Gear);
-                            Gear^.dY:= - _0_004 * dmg;
-                            Gear^.Active:= true
-                            end
-                        end;
+                            tdX:= Gear^.X-fX;
+                            tdY:= Gear^.Y-fY;
+                            if LongInt(tdX.Round + tdY.Round + 2) < dmgBase then
+                                dmg:= dmgBase - hwRound(Distance(tdX, tdY));
+                            if dmg > 1 then
+                                begin
+                                dmg:= ModifyDamage(min(dmg div 2, Radius), Gear);
+                                Gear^.dY:= - _0_004 * dmg;
+                                Gear^.Active:= true
+                                end
+                            end;
             end;
         end;
     Gear:= Gear^.NextGear