merge
authorunc0rr
Sun, 07 Nov 2010 20:39:23 +0300
changeset 4185 2502c381f1c3
parent 4183 646fc9e96ce2 (current diff)
parent 4184 bc2b88eea8c4 (diff)
child 4186 c2d590fc8df9
merge
--- a/hedgewars/GSHandlers.inc	Sun Nov 07 20:38:56 2010 +0300
+++ b/hedgewars/GSHandlers.inc	Sun Nov 07 20:39:23 2010 +0300
@@ -4199,6 +4199,9 @@
     hh: PHedgehog;
     i: LongInt;
 begin
+    if (TurnTimeLeft > 0) then
+        dec(TurnTimeLeft);
+
     AllInactive := false;
     hh := PHedgehog(Gear^.Hedgehog);
     DrawCentered(hwRound(hh^.Gear^.X) + WorldDx, hwRound(hh^.Gear^.Y) + WorldDy -
@@ -4218,8 +4221,7 @@
         if not TestCollisionYwithGear(hh^.Gear, -1) then hh^.Gear^.Y := hh^.Gear^.Y - _1;
         end;
 
-    graves := GearsNear(Gear^.X, Gear^.Y + int2hwFloat(Gear^.Power),
-                    gtGrave, Gear^.Radius);
+    graves := GearsNear(Gear^.X, Gear^.Y, gtGrave, Gear^.Radius);
 
     if Length(graves) = 0 then 
         begin
@@ -4229,7 +4231,7 @@
         exit;
         end;
 
-    if ((Gear^.Message and gmAttack) <> 0) and (hh^.Gear^.Health > 0) then 
+    if ((Gear^.Message and gmAttack) <> 0) and (hh^.Gear^.Health > 0) and (TurnTimeLeft > 0) then 
         begin
         i := getRandom(Length(graves));
         dec(hh^.Gear^.Health);