hedgewars/uGearsHedgehog.pas
changeset 8051 f26422ef0333
parent 8030 165aeaaaf445
child 8096 453917e94e55
child 8161 0b8beacff8a5
--- a/hedgewars/uGearsHedgehog.pas	Fri Nov 16 06:14:18 2012 +0100
+++ b/hedgewars/uGearsHedgehog.pas	Sat Nov 17 09:03:47 2012 -0500
@@ -103,6 +103,13 @@
             LoadHedgehogHat(HHGear^.Hedgehog^, 'Reserved/chef')
         else if prevAmmo = amKnife then
             LoadHedgehogHat(HHGear^.Hedgehog^, Hat);
+        end;
+    // Try again in the next slot
+    if CurAmmoType = prevAmmo then 
+        begin
+        if slot >= cMaxSlotIndex then slot:= 0 else inc(slot);
+        HHGear^.MsgParam:= slot;
+        ChangeAmmo(HHGear)
         end
     end
 end;