hedgewars/uGearsHandlersMess.pas
changeset 11040 3ab93d702fb1
parent 11039 cd4b0851b060
child 11042 d29a05a55bbc
--- a/hedgewars/uGearsHandlersMess.pas	Sun Aug 09 00:19:33 2015 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Sun Aug 09 00:25:35 2015 +0200
@@ -5228,15 +5228,15 @@
             //tmp^.State:= tmp^.State or gstFlatened;
             if (tmp^.Kind <> gtHedgehog) or (tmp^.Hedgehog^.Effects[heInvulnerable] = 0) then
                 begin
-                // do 1/2 current hp worth of damage if extra damage is enabled (1/3 damage if not)
-                if cDamageModifier > _1 then
-                    d:= 2
-                else
-                    d:= 3;
                 // base damage on remaining health
                 dmg:= (tmp^.Health - tmp^.Damage);
                 if dmg > 0 then
                     begin
+                    // do 1/2 current hp worth of damage if extra damage is enabled (1/3 damage if not)
+                    if cDamageModifier > _1 then
+                        d:= 2
+                    else
+                        d:= 3;
                     // always round up
                     if dmg mod d > 0 then
                         dmg:= dmg div d + 1