hedgewars/uGears.pas
changeset 5862 b4229b0abc70
parent 5857 63276513b7b3
child 5863 cea9ac437839
--- a/hedgewars/uGears.pas	Sun Sep 11 18:57:54 2011 +0200
+++ b/hedgewars/uGears.pas	Sun Sep 11 13:12:52 2011 -0400
@@ -603,6 +603,7 @@
 else if Gear^.Kind = gtHedgehog then
     if (CurAmmoGear <> nil) and (CurrentHedgehog^.Gear = Gear) then
         begin
+        AttackBar:= 0;
         Gear^.Message:= gmDestroy;
         CurAmmoGear^.Message:= gmDestroy;
         exit
@@ -620,6 +621,7 @@
         team:= Gear^.Hedgehog^.Team;
         if CurrentHedgehog^.Gear = Gear then
             begin
+            AttackBar:= 0;
             FreeActionsList; // to avoid ThinkThread on drawned gear
             if ((Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NoRoundEnd) <> 0) and (CurrentHedgehog^.MultiShootAttacks > 0) then OnUsedAmmo(CurrentHedgehog^);
             end;
@@ -1012,7 +1014,6 @@
 var  i: LongInt;
      t: PGear;
 begin
-    AttackBar:= 0;  // rare case where they drowned while attacking
     SpeechText:= ''; // in case it has not been consumed
 
     if (GameFlags and gfLowGravity) = 0 then