remove ammo if you suicide in the middle of uses
authornemo
Sun, 20 Mar 2011 15:00:01 -0400
changeset 5033 46da78d7966b
parent 5031 e26f430be1ed
child 5034 a30772158f50
remove ammo if you suicide in the middle of uses
hedgewars/uGears.pas
--- a/hedgewars/uGears.pas	Sun Mar 20 12:52:36 2011 -0400
+++ b/hedgewars/uGears.pas	Sun Mar 20 15:00:01 2011 -0400
@@ -583,7 +583,10 @@
 
         team:= Gear^.Hedgehog^.Team;
         if CurrentHedgehog^.Gear = Gear then
+            begin
             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;
 
         Gear^.Hedgehog^.Gear:= nil;
         if Gear^.Hedgehog^.King then