Cheating
authornemo
Thu, 06 May 2010 02:00:39 +0000
changeset 3430 21c08c95a672
parent 3429 1f12646331d4
child 3431 e36dffdf7b82
Cheating
hedgewars/HHHandlers.inc
--- a/hedgewars/HHHandlers.inc	Thu May 06 01:43:56 2010 +0000
+++ b/hedgewars/HHHandlers.inc	Thu May 06 02:00:39 2010 +0000
@@ -30,6 +30,8 @@
        ((MultiShootAttacks > 0) and ((Ammo^[CurSlot, CurAmmo].Propz and ammoprop_NoRoundEndHint) = 0)) or
        ((Gear^.State and gstHHDriven) = 0) then exit;
 
+    if ((Ammo^[CurSlot, CurAmmo].Propz and ammoprop_NoRoundEndHint) <> 0) and (MultiShootAttacks > 0) then OnUsedAmmo(PHedgehog(Gear^.Hedgehog)^);
+
     MultiShootAttacks:= 0;
     Gear^.Message:= Gear^.Message and not (gm_LJump or gm_HJump);
 
@@ -275,12 +277,14 @@
             end
         else
             begin
+            OnUsedAmmo(CurrentHedgehog^);
             if ((Ammo^[CurSlot, CurAmmo].Propz) and ammoprop_NoRoundEndHint) = 0 then
                 begin
                 TurnTimeLeft:= Ammoz[Ammo^[CurSlot, CurAmmo].AmmoType].TimeAfterTurn;
                 State:= State or gstAttacked
-                end;
-            OnUsedAmmo(CurrentHedgehog^);
+                end
+            else
+                ApplyAmmoChanges(CurrentHedgehog^);
             end;
         end
     else