Remove this looping past F10. causes infinite loop with no weapons. Besides, should always have skip in last slot unless a script is screwing with it.
authornemo
Sat, 26 Oct 2013 13:58:49 -0400
changeset 9579 1f20cc6a642a
parent 9577 9577634bd284
child 9581 eb35cc7ad9f0
Remove this looping past F10. causes infinite loop with no weapons. Besides, should always have skip in last slot unless a script is screwing with it.
hedgewars/uGearsHedgehog.pas
--- a/hedgewars/uGearsHedgehog.pas	Thu Oct 24 21:18:22 2013 -0400
+++ b/hedgewars/uGearsHedgehog.pas	Sat Oct 26 13:58:49 2013 -0400
@@ -116,7 +116,7 @@
     // Try again in the next slot
     if CurAmmoType = prevAmmo then
         begin
-        if slot >= cMaxSlotIndex then slot:= 0 else inc(slot);
+        if slot < cMaxSlotIndex then inc(slot);
         HHGear^.MsgParam:= slot;
         ChangeAmmo(HHGear)
         end